home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / generic / patch.doc < prev    next >
LaTeX Document  |  1994-01-31  |  23.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
100% dexvert Texinfo Document (document/texInfo) magic Supported
1% dexvert WANG Integrated Word Processor (document/wangIWP) ext Unsupported
1% dexvert Excellence! Document (document/excellenceDocument) ext Unsupported
1% dexvert Norton Textra Writer (document/textraWriter) ext Unsupported
1% dexvert IBM DisplayWrite Document (document/ibmDisplayWriteDocument) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file TeX document text default
98% file LaTeX document, ASCII text default
100% TrID LaTeX 2e document (with rem) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/x-matlab default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 5c 69 66 66 61 6c 73 | 65 20 54 68 69 73 20 69 |%\iffals|e This i|
|00000010| 73 20 70 61 74 63 68 2e | 64 6f 63 2c 20 61 6e 64 |s patch.|doc, and|
|00000020| 20 69 74 27 73 20 2d 2a | 2d 4c 61 54 65 58 2d 2a | it's -*|-LaTeX-*|
|00000030| 2d 20 74 65 78 74 0a 25 | 25 20 70 61 74 63 68 2e |- text.%|% patch.|
|00000040| 64 6f 63 2f 70 61 74 63 | 68 2e 74 65 78 0a 25 25 |doc/patc|h.tex.%%|
|00000050| 20 28 63 29 20 31 39 39 | 34 20 62 79 20 44 61 76 | (c) 199|4 by Dav|
|00000060| 69 64 20 4b 61 73 74 72 | 75 70 20 28 64 61 6b 40 |id Kastr|up (dak@|
|00000070| 70 6f 6f 6c 2e 69 6e 66 | 6f 72 6d 61 74 69 6b 2e |pool.inf|ormatik.|
|00000080| 72 77 74 68 2d 61 61 63 | 68 65 6e 2e 64 65 29 0a |rwth-aac|hen.de).|
|00000090| 25 25 20 56 65 72 73 69 | 6f 6e 20 30 2e 39 31 0a |%% Versi|on 0.91.|
|000000a0| 25 25 20 52 65 64 69 73 | 74 72 69 62 75 74 69 6f |%% Redis|tributio|
|000000b0| 6e 20 6f 66 20 70 61 74 | 63 68 2e 64 6f 63 20 69 |n of pat|ch.doc i|
|000000c0| 73 20 61 6c 6c 6f 77 65 | 64 2c 20 70 72 6f 76 69 |s allowe|d, provi|
|000000d0| 64 65 64 20 69 74 20 69 | 73 20 6e 6f 74 20 6d 6f |ded it i|s not mo|
|000000e0| 64 69 66 69 65 64 0a 25 | 25 20 69 6e 20 61 6e 79 |dified.%|% in any|
|000000f0| 20 77 61 79 2e 20 54 68 | 65 20 73 74 72 69 70 70 | way. Th|e stripp|
|00000100| 65 64 20 76 65 72 73 69 | 6f 6e 20 70 61 74 63 68 |ed versi|on patch|
|00000110| 2e 74 65 78 20 6d 61 79 | 20 6f 6e 6c 79 20 62 65 |.tex may| only be|
|00000120| 20 64 69 73 74 72 69 62 | 75 74 65 64 0a 25 25 20 | distrib|uted.%% |
|00000130| 61 73 20 70 61 72 74 20 | 6f 66 20 6f 74 68 65 72 |as part |of other|
|00000140| 20 70 61 63 6b 61 67 65 | 73 2c 20 61 6e 64 20 6f | package|s, and o|
|00000150| 6e 6c 79 20 69 66 20 74 | 68 65 20 75 6e 73 74 72 |nly if t|he unstr|
|00000160| 69 70 70 65 64 20 76 65 | 72 73 69 6f 6e 0a 25 25 |ipped ve|rsion.%%|
|00000170| 20 69 73 20 64 69 73 74 | 72 69 62 75 74 65 64 20 | is dist|ributed |
|00000180| 6f 6e 20 64 65 6d 61 6e | 64 2e 0a 25 20 53 74 72 |on deman|d..% Str|
|00000190| 69 70 70 69 6e 67 20 69 | 73 20 74 6f 20 62 65 20 |ipping i|s to be |
|000001a0| 64 6f 6e 65 20 62 79 20 | 72 65 6d 6f 76 69 6e 67 |done by |removing|
|000001b0| 20 61 6c 6c 20 6c 69 6e | 65 73 20 73 74 61 72 74 | all lin|es start|
|000001c0| 69 6e 67 20 77 69 74 68 | 20 61 20 73 69 6e 67 6c |ing with| a singl|
|000001d0| 65 0a 25 20 70 65 72 63 | 65 6e 74 20 73 69 67 6e |e.% perc|ent sign|
|000001e0| 2e 0a 25 20 59 6f 75 20 | 6d 61 79 20 65 78 74 72 |..% You |may extr|
|000001f0| 61 63 74 20 61 20 64 72 | 69 76 65 72 20 66 69 6c |act a dr|iver fil|
|00000200| 65 20 66 6f 72 20 70 72 | 69 6e 74 69 6e 67 20 74 |e for pr|inting t|
|00000210| 68 65 20 64 6f 63 75 6d | 65 6e 74 61 74 69 6f 6e |he docum|entation|
|00000220| 20 77 69 74 68 0a 25 20 | 74 68 65 20 64 6f 63 20 | with.% |the doc |
|00000230| 73 74 79 6c 65 20 70 61 | 63 6b 61 67 65 20 62 79 |style pa|ckage by|
|00000240| 20 65 78 74 72 61 63 74 | 69 6e 67 20 61 6c 6c 20 | extract|ing all |
|00000250| 6c 69 6e 65 73 20 73 74 | 61 72 74 69 6e 67 20 77 |lines st|arting w|
|00000260| 69 74 68 0a 25 20 25 3c | 2b 64 72 69 76 65 72 3e |ith.% %<|+driver>|
|00000270| 2c 20 77 68 69 6c 65 20 | 72 65 6d 6f 76 69 6e 67 |, while |removing|
|00000280| 20 74 68 65 20 25 3c 2b | 64 72 69 76 65 72 3e 20 | the %<+|driver> |
|00000290| 64 69 72 65 63 74 69 76 | 65 2e 0a 25 5c 66 69 0a |directiv|e..%\fi.|
|000002a0| 25 20 5c 43 68 65 63 6b | 53 75 6d 7b 33 36 30 7d |% \Check|Sum{360}|
|000002b0| 0a 25 20 5c 74 69 74 6c | 65 7b 55 73 69 6e 67 20 |.% \titl|e{Using |
|000002c0| 7b 5c 74 74 20 70 61 74 | 63 68 2e 74 65 78 7d 7d |{\tt pat|ch.tex}}|
|000002d0| 0a 25 20 5c 61 75 74 68 | 6f 72 7b 44 61 76 69 64 |.% \auth|or{David|
|000002e0| 20 4b 61 73 74 72 75 70 | 5c 5c 64 61 6b 40 70 6f | Kastrup|\\dak@po|
|000002f0| 6f 6c 2e 69 6e 66 6f 72 | 6d 61 74 69 6b 2e 72 77 |ol.infor|matik.rw|
|00000300| 74 68 2d 61 61 63 68 65 | 6e 2e 64 65 7d 0a 25 20 |th-aache|n.de}.% |
|00000310| 5c 64 61 74 65 7b 4a 61 | 6e 75 61 72 79 20 32 32 |\date{Ja|nuary 22|
|00000320| 2c 20 31 39 39 34 7d 0a | 25 20 5c 6d 61 6b 65 74 |, 1994}.|% \maket|
|00000330| 69 74 6c 65 0a 25 20 5c | 4d 61 6b 65 53 68 6f 72 |itle.% \|MakeShor|
|00000340| 74 56 65 72 62 5c 22 0a | 25 20 5c 62 65 67 69 6e |tVerb\".|% \begin|
|00000350| 7b 61 62 73 74 72 61 63 | 74 7d 0a 25 20 20 20 4f |{abstrac|t}.% O|
|00000360| 66 74 65 6e 20 6f 6e 65 | 20 68 61 73 20 74 68 65 |ften one| has the|
|00000370| 20 6e 65 65 64 20 74 6f | 20 75 73 65 20 61 20 70 | need to| use a p|
|00000380| 72 65 65 73 74 61 62 6c | 69 73 68 65 64 20 66 6f |reestabl|ished fo|
|00000390| 72 6d 61 74 2c 20 73 75 | 63 68 0a 25 20 20 20 61 |rmat, su|ch.% a|
|000003a0| 73 7e 5c 4c 61 54 65 58 | 2c 20 62 75 74 20 77 69 |s~\LaTeX|, but wi|
|000003b0| 74 68 20 73 6f 6d 65 20 | 73 6c 69 67 68 74 20 63 |th some |slight c|
|000003c0| 68 61 6e 67 65 73 20 74 | 6f 20 73 6f 6d 65 20 6f |hanges t|o some o|
|000003d0| 66 20 74 68 65 20 6d 61 | 63 72 6f 73 2e 0a 25 20 |f the ma|cros..% |
|000003e0| 20 20 4f 66 7e 63 6f 75 | 72 73 65 2c 20 69 74 20 | Of~cou|rse, it |
|000003f0| 69 73 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 6a |is possi|ble to j|
|00000400| 75 73 74 20 63 6f 70 79 | 20 74 68 65 20 6f 66 66 |ust copy| the off|
|00000410| 65 6e 64 69 6e 20 6d 61 | 63 6f 0a 25 20 20 20 64 |endin ma|co.% d|
|00000420| 65 66 69 6e 69 74 69 6f | 6e 73 20 69 6e 74 6f 20 |efinitio|ns into |
|00000430| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|00000440| 20 6f 72 20 73 74 79 6c | 65 20 66 69 6c 65 2c 20 | or styl|e file, |
|00000450| 61 6e 64 7e 6d 6f 64 69 | 66 79 20 74 68 65 6d 0a |and~modi|fy them.|
|00000460| 25 20 20 20 74 68 65 72 | 65 2e 20 54 68 69 73 20 |% ther|e. This |
|00000470| 63 61 6e 20 6c 65 61 64 | 20 74 6f 20 70 61 72 74 |can lead| to part|
|00000480| 73 20 6f 66 20 79 6f 75 | 72 20 6d 61 63 72 6f 73 |s of you|r macros|
|00000490| 20 62 65 69 6e 67 20 66 | 72 6f 6d 20 64 69 66 66 | being f|rom diff|
|000004a0| 65 72 65 6e 74 0a 25 20 | 20 20 76 65 72 73 69 6f |erent.% | versio|
|000004b0| 6e 73 20 6f 66 20 5c 4c | 61 54 65 58 7b 7d 20 72 |ns of \L|aTeX{} r|
|000004c0| 65 73 70 2e 7e 5c 54 65 | 58 2e 0a 25 0a 25 20 20 |esp.~\Te|X..%.% |
|000004d0| 20 54 68 69 73 20 69 6e | 70 75 74 20 66 69 6c 65 | This in|put file|
|000004e0| 20 69 73 20 61 20 74 6f | 6f 6c 20 66 6f 72 20 72 | is a to|ol for r|
|000004f0| 65 70 6c 61 63 69 6e 67 | 20 6a 75 73 74 20 70 61 |eplacing| just pa|
|00000500| 72 74 73 20 6f 66 20 65 | 78 69 73 74 69 6e 67 20 |rts of e|xisting |
|00000510| 6d 61 63 72 6f 73 0a 25 | 20 20 20 62 79 20 75 73 |macros.%| by us|
|00000520| 65 72 20 64 65 66 69 6e | 65 64 20 70 61 72 74 73 |er defin|ed parts|
|00000530| 2e 20 49 66 20 74 68 6f | 73 65 20 70 61 72 74 73 |. If tho|se parts|
|00000540| 20 61 72 65 20 6e 6f 20 | 6c 6f 6e 67 65 72 20 72 | are no |longer r|
|00000550| 65 63 6f 67 6e 69 7a 61 | 62 6c 65 2c 0a 25 20 20 |ecogniza|ble,.% |
|00000560| 20 61 6e 7e 65 72 72 6f | 72 20 6d 65 73 73 61 67 | an~erro|r messag|
|00000570| 65 20 69 73 20 70 72 6f | 64 75 63 65 64 2c 20 63 |e is pro|duced, c|
|00000580| 61 6c 6c 69 6e 67 20 74 | 68 65 20 75 73 65 72 20 |alling t|he user |
|00000590| 74 6f 7e 61 74 74 65 6e | 74 69 6f 6e 2e 0a 25 20 |to~atten|tion..% |
|000005a0| 5c 65 6e 64 7b 61 62 73 | 74 72 61 63 74 7d 0a 25 |\end{abs|tract}.%|
|000005b0| 20 5c 74 61 62 6c 65 6f | 66 63 6f 6e 74 65 6e 74 | \tableo|fcontent|
|000005c0| 73 0a 25 20 5c 73 65 63 | 74 69 6f 6e 7b 55 73 65 |s.% \sec|tion{Use|
|000005d0| 72 20 49 6e 74 65 72 66 | 61 63 65 7d 0a 25 20 54 |r Interf|ace}.% T|
|000005e0| 68 65 20 6d 61 63 72 6f | 73 20 64 65 66 69 6e 65 |he macro|s define|
|000005f0| 64 20 68 65 72 65 20 77 | 69 6c 6c 20 61 6c 6c 6f |d here w|ill allo|
|00000600| 77 20 60 60 70 61 74 63 | 68 69 6e 67 27 27 20 75 |w ``patc|hing'' u|
|00000610| 70 20 61 6c 72 65 61 64 | 79 20 65 78 69 73 74 69 |p alread|y existi|
|00000620| 6e 67 0a 25 20 6d 61 63 | 72 6f 73 2e 20 41 7e 74 |ng.% mac|ros. A~t|
|00000630| 79 70 69 63 61 6c 20 65 | 78 61 6d 70 6c 65 2c 20 |ypical e|xample, |
|00000640| 69 6e 63 6c 75 64 65 64 | 20 66 72 6f 6d 20 61 7e |included| from a~|
|00000650| 73 74 79 6c 65 20 66 69 | 6c 65 20 75 73 65 64 20 |style fi|le used |
|00000660| 66 6f 72 0a 25 20 74 79 | 70 65 73 65 74 74 69 6e |for.% ty|pesettin|
|00000670| 67 20 47 72 65 65 6b 20 | 74 65 78 74 20 28 74 6f |g Greek |text (to|
|00000680| 7e 61 70 70 65 61 72 20 | 69 6e 20 22 6b 64 67 72 |~appear |in "kdgr|
|00000690| 65 65 6b 22 29 20 69 73 | 20 74 68 65 20 66 6f 6c |eek") is| the fol|
|000006a0| 6c 6f 77 69 6e 67 3a 0a | 25 5c 62 65 67 69 6e 7b |lowing:.|%\begin{|
|000006b0| 76 65 72 62 61 74 69 6d | 7d 0a 25 5c 69 6e 70 75 |verbatim|}.%\inpu|
|000006c0| 74 20 70 61 74 63 68 2e | 74 65 78 0a 25 5c 69 66 |t patch.|tex.%\if|
|000006d0| 78 5c 64 65 73 63 72 69 | 70 74 69 6f 6e 6c 61 62 |x\descri|ptionlab|
|000006e0| 65 6c 5c 75 6e 64 65 66 | 69 6e 65 64 5c 65 6c 73 |el\undef|ined\els|
|000006f0| 65 0a 25 5c 67 70 61 74 | 63 68 5c 64 65 73 63 72 |e.%\gpat|ch\descr|
|00000700| 69 70 74 69 6f 6e 6c 61 | 62 65 6c 23 31 7b 7b 23 |iptionla|bel#1{{#|
|00000710| 31 7d 7d 7b 25 0a 25 20 | 20 20 20 5c 62 66 20 7b |1}}{%.% | \bf {|
|00000720| 5c 67 72 62 66 7d 7d 20 | 5c 66 69 0a 25 5c 69 66 |\grbf}} |\fi.%\if|
|00000730| 78 5c 40 70 61 72 74 5c | 75 6e 64 65 66 69 6e 65 |x\@part\|undefine|
|00000740| 64 5c 65 6c 73 65 0a 25 | 5c 67 70 61 74 63 68 5c |d\else.%|\gpatch\|
|00000750| 40 70 61 72 74 5b 23 31 | 5d 23 32 7b 5b 23 31 5d |@part[#1|]#2{[#1]|
|00000760| 7b 23 32 7d 7d 7b 25 0a | 25 20 20 20 20 5c 62 66 |{#2}}{%.|% \bf|
|00000770| 5c 70 61 72 74 6e 61 6d | 65 7e 7b 5c 67 72 62 66 |\partnam|e~{\grbf|
|00000780| 5c 70 61 72 74 6e 61 6d | 65 5c 6e 6f 62 72 65 61 |\partnam|e\nobrea|
|00000790| 6b 5c 20 7d 25 0a 25 20 | 20 20 20 5c 62 66 20 7b |k\ }%.% | \bf {|
|000007a0| 5c 67 72 62 66 7d 7d 20 | 5c 66 69 0a 25 2e 2e 2e |\grbf}} |\fi.%...|
|000007b0| 0a 25 5c 65 6e 64 70 61 | 74 63 68 0a 25 5c 65 6e |.%\endpa|tch.%\en|
|000007c0| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 25 54 68 69 |d{verbat|im}.%Thi|
|000007d0| 73 20 73 68 6f 77 73 20 | 61 6c 6d 6f 73 74 20 61 |s shows |almost a|
|000007e0| 6c 6c 20 66 65 61 74 75 | 72 65 73 20 74 68 61 74 |ll featu|res that|
|000007f0| 20 61 72 65 20 72 65 61 | 6c 6c 79 20 74 68 65 72 | are rea|lly ther|
|00000800| 65 2e 20 59 6f 75 20 73 | 74 61 72 74 20 62 79 0a |e. You s|tart by.|
|00000810| 25 69 6e 70 75 74 74 69 | 6e 67 20 22 70 61 74 63 |%inputti|ng "patc|
|00000820| 68 2e 74 65 78 22 2e 20 | 54 68 69 73 2c 20 61 6d |h.tex". |This, am|
|00000830| 6f 6e 67 20 6f 74 68 65 | 72 20 74 68 69 6e 67 73 |ong othe|r things|
|00000840| 2c 20 6f 70 65 6e 73 20 | 61 7e 6c 6f 63 61 6c 0a |, opens |a~local.|
|00000850| 25 67 72 6f 75 70 20 69 | 6e 20 77 68 69 63 68 20 |%group i|n which |
|00000860| 61 6c 6c 20 6f 66 20 74 | 68 65 20 64 65 66 69 6e |all of t|he defin|
|00000870| 69 74 69 6f 6e 73 20 6f | 66 7e 22 70 61 74 63 68 |itions o|f~"patch|
|00000880| 2e 74 65 78 22 20 61 72 | 65 20 72 65 61 64 7e 69 |.tex" ar|e read~i|
|00000890| 6e 2e 0a 25 49 6e 7e 6f | 72 64 65 72 20 6e 6f 74 |n..%In~o|rder not|
|000008a0| 20 74 6f 20 75 73 65 20 | 75 70 20 75 6e 6e 65 63 | to use |up unnec|
|000008b0| 65 73 73 61 72 79 20 68 | 61 73 68 7e 73 70 61 63 |essary h|ash~spac|
|000008c0| 65 2c 20 61 6c 6d 6f 73 | 74 20 61 6c 6c 20 6c 6f |e, almos|t all lo|
|000008d0| 63 61 6c 0a 25 63 6f 6d | 6d 61 6e 64 73 20 61 72 |cal.%com|mands ar|
|000008e0| 65 20 69 6e 20 74 68 65 | 20 66 6f 72 6d 7e 22 5c |e in the| form~"\|
|000008f0| 5e 5e 38 30 22 20 61 6e | 64 20 75 70 77 61 72 64 |^^80" an|d upward|
|00000900| 73 2e 20 46 6f 72 20 74 | 68 69 73 20 72 65 61 73 |s. For t|his reas|
|00000910| 6f 6e 2c 0a 25 79 6f 75 | 20 63 61 6e 6e 6f 74 20 |on,.%you| cannot |
|00000920| 7b 5c 65 6d 20 75 73 65 | 5c 2f 7d 20 61 6e 79 20 |{\em use|\/} any |
|00000930| 6d 61 63 72 6f 73 20 6f | 66 20 79 6f 75 72 73 20 |macros o|f yours |
|00000940| 77 69 74 68 20 73 75 63 | 68 20 6e 61 6d 65 73 0a |with suc|h names.|
|00000950| 25 28 4e 6f 74 65 3a 20 | 74 68 65 79 20 61 72 65 |%(Note: |they are|
|00000960| 20 7b 5c 65 6d 0a 25 6e | 6f 74 5c 2f 7d 20 61 63 | {\em.%n|ot\/} ac|
|00000970| 74 69 76 65 20 63 68 61 | 72 61 63 74 65 72 73 2c |tive cha|racters,|
|00000980| 20 62 75 74 20 72 61 74 | 68 65 72 20 72 65 67 75 | but rat|her regu|
|00000990| 6c 61 72 20 6f 6e 65 2d | 6c 65 74 74 65 72 20 63 |lar one-|letter c|
|000009a0| 6f 6e 74 72 6f 6c 0a 25 | 73 65 71 75 65 6e 63 65 |ontrol.%|sequence|
|000009b0| 73 29 2c 20 61 6e 64 20 | 79 6f 75 20 73 68 6f 75 |s), and |you shou|
|000009c0| 6c 64 20 6e 6f 74 20 70 | 61 74 63 68 20 74 68 65 |ld not p|atch the|
|000009d0| 6d 2c 20 62 75 74 20 79 | 6f 75 20 63 61 6e 20 70 |m, but y|ou can p|
|000009e0| 61 74 63 68 20 61 6e 79 | 0a 25 6d 61 63 72 6f 73 |atch any|.%macros|
|000009f0| 20 63 6f 6e 74 61 69 6e | 69 6e 67 20 74 68 65 6d | contain|ing them|
|00000a00| 2c 20 6f 72 20 70 61 74 | 63 68 20 74 68 65 6d 20 |, or pat|ch them |
|00000a10| 69 6e 74 6f 20 6d 61 63 | 72 6f 73 2e 0a 25 0a 25 |into mac|ros..%.%|
|00000a20| 4f 6e 65 20 6d 61 63 72 | 6f 20 69 73 20 7b 5c 65 |One macr|o is {\e|
|00000a30| 6d 20 76 65 72 79 5c 2f | 7d 20 73 70 65 63 69 61 |m very\/|} specia|
|00000a40| 6c 20 61 6e 64 20 6d 75 | 73 74 20 6e 6f 74 20 61 |l and mu|st not a|
|00000a50| 70 70 65 61 72 20 69 6e | 20 61 6e 79 20 6d 61 63 |ppear in| any mac|
|00000a60| 72 6f 0a 25 79 6f 75 20 | 70 61 74 63 68 2c 20 6e |ro.%you |patch, n|
|00000a70| 6f 72 20 69 6e 20 61 6e | 79 20 61 72 67 75 6d 65 |or in an|y argume|
|00000a80| 6e 74 73 20 74 6f 7e 22 | 5c 70 61 74 63 68 22 3a |nts to~"|\patch":|
|00000a90| 20 74 68 69 73 20 69 73 | 7e 22 5c 40 6e 64 70 40 | this is|~"\@ndp@|
|00000aa0| 74 63 68 22 2e 0a 25 0a | 25 5c 44 65 73 63 72 69 |tch"..%.|%\Descri|
|00000ab0| 62 65 4d 61 63 72 6f 7b | 5c 70 61 74 63 68 7d 0a |beMacro{|\patch}.|
|00000ac0| 25 5c 44 65 73 63 72 69 | 62 65 4d 61 63 72 6f 7b |%\Descri|beMacro{|
|00000ad0| 5c 67 70 61 74 63 68 7d | 0a 25 59 6f 75 20 66 6f |\gpatch}|.%You fo|
|00000ae0| 6c 6c 6f 77 20 74 68 65 | 20 22 5c 69 6e 70 75 74 |llow the| "\input|
|00000af0| 22 20 62 79 20 73 65 76 | 65 72 61 6c 20 22 5c 70 |" by sev|eral "\p|
|00000b00| 61 74 63 68 22 20 6f 72 | 20 22 5c 67 70 61 74 63 |atch" or| "\gpatc|
|00000b10| 68 22 0a 25 63 6f 6d 6d | 61 6e 64 73 2e 20 54 68 |h".%comm|ands. Th|
|00000b20| 65 73 65 20 63 6f 6d 6d | 61 6e 64 73 0a 25 63 6f |ese comm|ands.%co|
|00000b30| 6e 73 69 73 74 20 6f 66 | 20 73 65 76 65 72 61 6c |nsist of| several|
|00000b40| 20 70 61 72 74 73 3a 0a | 25 5c 62 65 67 69 6e 7b | parts:.|%\begin{|
|00000b50| 69 74 65 6d 69 7a 65 7d | 0a 25 5c 69 74 65 6d 5b |itemize}|.%\item[|
|00000b60| 4f 70 74 69 6f 6e 61 6c | 20 22 5c 62 73 6c 61 73 |Optional| "\bslas|
|00000b70| 68 20 6c 6f 6e 67 22 5d | 20 66 6f 72 20 64 65 66 |h long"]| for def|
|00000b80| 69 6e 69 74 69 6f 6e 20 | 6f 66 20 6d 61 63 72 6f |inition |of macro|
|00000b90| 73 20 70 6f 73 73 69 62 | 6c 79 20 63 6f 6e 74 61 |s possib|ly conta|
|00000ba0| 69 6e 69 6e 67 0a 25 20 | 20 22 5c 70 61 72 22 20 |ining.% | "\par" |
|00000bb0| 74 6f 6b 65 6e 73 20 69 | 6e 20 74 68 65 69 72 20 |tokens i|n their |
|00000bc0| 61 72 67 75 6d 65 6e 74 | 73 2e 20 4e 6f 74 65 20 |argument|s. Note |
|00000bd0| 74 68 61 74 20 74 68 65 | 20 70 72 65 66 69 78 65 |that the| prefixe|
|00000be0| 73 20 22 5c 67 6c 6f 62 | 61 6c 22 0a 25 20 20 61 |s "\glob|al".% a|
|00000bf0| 6e 64 7e 22 5c 6f 75 74 | 65 72 22 20 61 72 65 20 |nd~"\out|er" are |
|00000c00| 6e 6f 74 20 73 75 70 70 | 6f 72 74 65 64 2e 20 22 |not supp|orted. "|
|00000c10| 5c 67 6c 6f 62 61 6c 22 | 6e 65 73 73 20 69 73 20 |\global"|ness is |
|00000c20| 61 63 68 69 65 76 65 64 | 20 62 79 7e 75 73 61 67 |achieved| by~usag|
|00000c30| 65 0a 25 20 20 6f 66 7e | 22 5c 67 70 61 74 63 68 |e.% of~|"\gpatch|
|00000c40| 22 20 61 73 20 6f 70 70 | 6f 73 65 64 20 74 6f 7e |" as opp|osed to~|
|00000c50| 22 5c 70 61 74 63 68 22 | 2c 20 61 6e 64 20 69 73 |"\patch"|, and is|
|00000c60| 20 65 78 70 6c 61 69 6e | 65 64 20 6c 61 74 65 72 | explain|ed later|
|00000c70| 2c 20 61 6e 64 0a 25 20 | 20 22 5c 6f 75 74 65 72 |, and.% | "\outer|
|00000c80| 22 20 6d 61 63 72 6f 73 | 20 61 72 65 20 64 65 74 |" macros| are det|
|00000c90| 65 73 74 61 62 6c 65 2e | 0a 25 5c 69 74 65 6d 20 |estable.|.%\item |
|00000ca0| 5b 22 5c 62 73 6c 61 73 | 68 20 70 61 74 63 68 22 |["\bslas|h patch"|
|00000cb0| 20 6f 72 20 22 5c 62 73 | 6c 61 73 68 20 67 70 61 | or "\bs|lash gpa|
|00000cc0| 74 63 68 22 5d 20 54 6f | 20 62 65 20 65 78 70 65 |tch"] To| be expe|
|00000cd0| 63 74 65 64 2e 0a 25 5c | 69 74 65 6d 20 5b 5c 6d |cted..%\|item [\m|
|00000ce0| 65 74 61 7b 41 72 67 75 | 6d 65 6e 74 20 6c 69 73 |eta{Argu|ment lis|
|00000cf0| 74 7d 5d 20 77 68 69 63 | 68 20 69 73 20 74 68 65 |t}] whic|h is the|
|00000d00| 20 61 72 67 75 6d 65 6e | 74 20 6c 69 73 74 20 74 | argumen|t list t|
|00000d10| 68 65 20 6d 61 63 72 6f | 20 77 69 6c 6c 0a 25 20 |he macro| will.% |
|00000d20| 20 68 61 76 65 20 69 6e | 20 74 68 65 20 70 61 74 | have in| the pat|
|00000d30| 63 68 65 64 20 76 65 72 | 73 69 6f 6e 20 28 75 73 |ched ver|sion (us|
|00000d40| 75 61 6c 6c 79 20 74 68 | 65 20 73 61 6d 65 20 61 |ually th|e same a|
|00000d50| 73 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 6f |s the or|iginal o|
|00000d60| 6e 65 29 2e 0a 25 20 20 | 49 74 7e 69 73 20 74 65 |ne)..% |It~is te|
|00000d70| 72 6d 69 6e 61 74 65 64 | 20 62 79 20 74 68 65 20 |rminated| by the |
|00000d80| 6f 70 65 6e 69 6e 67 20 | 62 72 61 63 65 20 6f 66 |opening |brace of|
|00000d90| 0a 25 5c 69 74 65 6d 20 | 5b 5c 6d 65 74 61 7b 41 |.%\item |[\meta{A|
|00000da0| 72 67 75 6d 65 6e 74 20 | 72 65 70 6c 61 63 65 6d |rgument |replacem|
|00000db0| 65 6e 74 7d 5d 20 77 68 | 69 63 68 20 69 73 20 65 |ent}] wh|ich is e|
|00000dc0| 6e 63 6c 6f 73 65 64 20 | 69 6e 20 62 72 61 63 65 |nclosed |in brace|
|00000dd0| 73 2e 20 54 68 69 73 0a | 25 20 20 69 73 20 66 65 |s. This.|% is fe|
|00000de0| 64 20 61 73 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |d as an |argument|
|00000df0| 20 6c 69 73 74 20 69 6e | 74 6f 20 74 68 65 20 6f | list in|to the o|
|00000e00| 6c 64 20 6d 61 63 72 6f | 2c 20 69 6e 20 6f 72 64 |ld macro|, in ord|
|00000e10| 65 72 20 74 6f 20 67 65 | 74 20 74 68 65 0a 25 20 |er to ge|t the.% |
|00000e20| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 74 65 78 | replace|ment tex|
|00000e30| 74 20 66 6f 72 20 74 68 | 65 20 6e 65 77 20 6d 61 |t for th|e new ma|
|00000e40| 63 72 6f 2e 20 42 61 73 | 69 63 61 6c 6c 79 20 74 |cro. Bas|ically t|
|00000e50| 68 69 73 20 6d 65 61 6e | 73 20 74 68 61 74 20 79 |his mean|s that y|
|00000e60| 6f 75 0a 25 20 20 77 69 | 6c 6c 20 68 61 76 65 20 |ou.% wi|ll have |
|00000e70| 74 6f 20 75 73 65 2c 20 | 73 61 79 2c 20 22 7b 23 |to use, |say, "{#|
|00000e80| 31 7d 22 20 66 6f 72 20 | 61 6e 20 75 6e 64 65 6c |1}" for |an undel|
|00000e90| 69 6d 69 74 65 64 20 70 | 61 72 61 6d 65 74 65 72 |imited p|arameter|
|00000ea0| 7e 22 23 31 22 2c 0a 25 | 20 20 22 23 31 40 22 20 |~"#1",.%| "#1@" |
|00000eb0| 66 6f 72 20 61 20 64 65 | 6c 69 6d 69 74 65 64 20 |for a de|limited |
|00000ec0| 70 61 72 61 6d 65 74 65 | 72 20 22 23 31 40 22 2c |paramete|r "#1@",|
|00000ed0| 20 61 6e 64 20 22 40 24 | 23 21 3f 21 21 22 20 66 | and "@$|#!?!!" f|
|00000ee0| 6f 72 20 61 20 62 72 61 | 63 65 0a 25 20 20 64 65 |or a bra|ce.% de|
|00000ef0| 6c 69 6d 69 74 65 64 20 | 70 61 72 61 6d 65 74 65 |limited |paramete|
|00000f00| 72 20 22 23 31 23 7b 22 | 20 28 64 6f 6e 27 74 20 |r "#1#{"| (don't |
|00000f10| 74 72 79 20 70 61 74 63 | 68 69 6e 67 20 61 6e 79 |try patc|hing any|
|00000f20| 20 6d 61 63 72 6f 73 20 | 6c 69 6b 65 0a 25 20 20 | macros |like.% |
|00000f30| 74 68 61 74 2e 20 50 72 | 65 73 75 6d 65 20 79 6f |that. Pr|esume yo|
|00000f40| 75 20 68 61 76 65 20 6e | 65 76 65 72 20 68 65 61 |u have n|ever hea|
|00000f50| 72 64 20 6f 66 7e 74 68 | 65 6d 29 2e 0a 25 5c 69 |rd of~th|em)..%\i|
|00000f60| 74 65 6d 20 5b 5c 6d 65 | 74 61 7b 53 75 62 73 74 |tem [\me|ta{Subst|
|00000f70| 69 74 75 74 69 6f 6e 20 | 6c 69 73 74 7d 5d 20 54 |itution |list}] T|
|00000f80| 68 69 73 20 63 6f 6e 74 | 61 69 6e 73 20 61 7e 62 |his cont|ains a~b|
|00000f90| 72 61 63 65 20 65 6e 63 | 6c 6f 73 65 64 20 6c 69 |race enc|losed li|
|00000fa0| 73 74 0a 25 20 20 6f 66 | 7e 72 65 70 6c 61 63 65 |st.% of|~replace|
|00000fb0| 6d 65 6e 74 73 2e 20 45 | 61 63 68 20 72 65 70 6c |ments. E|ach repl|
|00000fc0| 61 63 65 6d 65 6e 74 20 | 63 6f 6e 73 69 73 74 73 |acement |consists|
|00000fd0| 20 6f 66 0a 25 20 20 5c | 62 65 67 69 6e 7b 69 74 | of.% \|begin{it|
|00000fe0| 65 6d 69 7a 65 7d 0a 25 | 20 20 5c 69 74 65 6d 20 |emize}.%| \item |
|00000ff0| 5b 5c 6d 65 74 61 7b 4d | 61 74 63 68 69 6e 67 20 |[\meta{M|atching |
|00001000| 73 65 71 75 65 6e 63 65 | 7d 5d 20 77 68 69 63 68 |sequence|}] which|
|00001010| 20 69 73 20 61 20 73 65 | 71 75 65 6e 63 65 20 6f | is a se|quence o|
|00001020| 66 20 74 6f 6b 65 6e 73 | 20 6e 6f 74 0a 25 20 20 |f tokens| not.% |
|00001030| 20 20 63 6f 6e 74 61 69 | 6e 69 6e 67 20 61 6e 79 | contai|ning any|
|00001040| 20 62 72 61 63 65 73 2e | 20 49 66 20 72 65 61 6c | braces.| If real|
|00001050| 6c 79 20 6e 65 65 64 20 | 74 6f 20 6d 61 74 63 68 |ly need |to match|
|00001060| 20 62 72 61 63 65 73 2c | 20 79 6f 75 20 63 61 6e | braces,| you can|
|00001070| 0a 25 20 20 20 20 6d 61 | 74 63 68 20 62 79 20 75 |.% ma|tch by u|
|00001080| 73 69 6e 67 20 69 6d 70 | 6c 69 63 69 74 20 62 72 |sing imp|licit br|
|00001090| 61 63 65 73 20 79 6f 75 | 20 67 65 74 20 62 79 20 |aces you| get by |
|000010a0| 73 61 79 69 6e 67 20 73 | 6f 6d 65 74 68 69 6e 67 |saying s|omething|
|000010b0| 20 6c 69 6b 65 0a 25 20 | 20 20 20 22 5c 6c 65 74 | like.% | "\let|
|000010c0| 5c 6f 70 65 6e 62 72 61 | 63 65 3d 7b 22 2e 20 49 |\openbra|ce={". I|
|000010d0| 66 20 79 6f 75 20 74 68 | 69 6e 6b 20 6f 66 20 75 |f you th|ink of u|
|000010e0| 73 69 6e 67 20 74 68 65 | 20 64 65 66 61 75 6c 74 |sing the| default|
|000010f0| 20 69 6d 70 6c 69 63 69 | 74 0a 25 20 20 20 20 62 | implici|t.% b|
|00001100| 72 61 63 65 73 20 22 5c | 62 67 72 6f 75 70 22 20 |races "\|bgroup" |
|00001110| 61 6e 64 7e 22 5c 65 67 | 72 6f 75 70 22 2c 20 66 |and~"\eg|roup", f|
|00001120| 6f 72 67 65 74 7e 69 74 | 2e 20 54 68 65 79 20 61 |orget~it|. They a|
|00001130| 72 65 20 75 73 65 64 20 | 69 6e 0a 25 20 20 20 20 |re used |in.% |
|00001140| 73 65 76 65 72 61 6c 20 | 6d 61 63 72 6f 73 20 77 |several |macros w|
|00001150| 65 20 6d 69 67 68 74 20 | 77 61 6e 74 20 74 6f 7e |e might |want to~|
|00001160| 70 61 74 63 68 2c 20 61 | 6e 64 20 74 68 75 73 20 |patch, a|nd thus |
|00001170| 61 72 65 20 64 69 73 61 | 62 6c 65 64 0a 25 20 20 |are disa|bled.% |
|00001180| 20 20 62 79 7e 64 65 66 | 61 75 6c 74 2e 0a 25 20 | by~def|ault..% |
|00001190| 20 5c 69 74 65 6d 20 5b | 5c 6d 65 74 61 7b 52 65 | \item [|\meta{Re|
|000011a0| 70 6c 61 63 65 6d 65 6e | 74 20 73 65 71 75 65 6e |placemen|t sequen|
|000011b0| 63 65 7d 5d 20 77 68 69 | 63 68 20 69 73 20 65 6e |ce}] whi|ch is en|
|000011c0| 63 6c 6f 73 65 64 20 69 | 6e 7e 62 72 61 63 65 73 |closed i|n~braces|
|000011d0| 2e 0a 25 20 20 20 20 41 | 67 61 69 6e 2c 20 69 66 |..% A|gain, if|
|000011e0| 20 79 6f 75 20 77 61 6e | 74 20 62 72 61 63 65 73 | you wan|t braces|
|000011f0| 20 74 6f 20 61 70 70 65 | 61 72 20 69 6e 20 79 6f | to appe|ar in yo|
|00001200| 75 72 20 72 65 70 6c 61 | 63 65 6d 65 6e 74 2c 20 |ur repla|cement, |
|00001210| 79 6f 75 20 63 61 6e 0a | 25 20 20 20 20 6d 61 6b |you can.|% mak|
|00001220| 65 20 74 68 61 74 20 68 | 61 70 70 65 6e 20 62 79 |e that h|appen by|
|00001230| 20 75 73 69 6e 67 20 69 | 6d 70 6c 69 63 69 74 20 | using i|mplicit |
|00001240| 62 72 61 63 65 73 2e 20 | 4d 61 74 63 68 65 64 20 |braces. |Matched |
|00001250| 62 72 61 63 65 73 2c 0a | 25 20 20 20 20 68 6f 77 |braces,.|% how|
|00001260| 65 76 65 72 2c 20 79 6f | 75 20 6d 61 79 20 69 6e |ever, yo|u may in|
|00001270| 63 6c 75 64 65 20 65 78 | 70 6c 69 63 69 74 6c 79 |clude ex|plicitly|
|00001280| 2e 0a 25 20 20 5c 65 6e | 64 7b 69 74 65 6d 69 7a |..% \en|d{itemiz|
|00001290| 65 7d 0a 25 5c 65 6e 64 | 7b 69 74 65 6d 69 7a 65 |e}.%\end|{itemize|
|000012a0| 7d 0a 25 5c 44 65 73 63 | 72 69 62 65 4d 61 63 72 |}.%\Desc|ribeMacr|
|000012b0| 6f 7b 5c 65 6e 64 70 61 | 74 63 68 7d 0a 25 54 68 |o{\endpa|tch}.%Th|
|000012c0| 65 6e 20 74 68 65 20 70 | 61 74 63 68 65 73 20 61 |en the p|atches a|
|000012d0| 72 65 20 66 6f 6c 6c 6f | 77 65 64 20 62 79 7e 22 |re follo|wed by~"|
|000012e0| 5c 65 6e 64 70 61 74 63 | 68 22 2c 20 77 68 69 63 |\endpatc|h", whic|
|000012f0| 68 20 63 6c 6f 73 65 73 | 20 74 68 65 20 67 72 6f |h closes| the gro|
|00001300| 75 70 0a 25 6f 70 65 6e | 65 64 20 62 79 7e 22 5c |up.%open|ed by~"\|
|00001310| 69 6e 70 75 74 22 2c 20 | 74 68 75 73 20 66 72 65 |input", |thus fre|
|00001320| 65 69 6e 67 20 75 70 20 | 61 6c 6d 6f 73 74 20 61 |eing up |almost a|
|00001330| 6c 6c 20 5c 54 65 58 7b | 7d 20 73 70 61 63 65 0a |ll \TeX{|} space.|
|00001340| 25 22 70 61 74 63 68 2e | 74 65 78 22 20 74 6f 6f |%"patch.|tex" too|
|00001350| 6b 20 75 70 2e 20 53 69 | 6e 63 65 7e 6d 69 73 6d |k up. Si|nce~mism|
|00001360| 61 74 63 68 65 64 20 70 | 61 74 63 68 65 73 20 63 |atched p|atches c|
|00001370| 61 6e 20 62 65 20 68 61 | 72 64 20 74 6f 0a 25 64 |an be ha|rd to.%d|
|00001380| 69 61 67 6e 6f 73 65 2c | 20 22 5c 65 6e 64 70 61 |iagnose,| "\endpa|
|00001390| 74 63 68 22 20 69 73 20 | 64 65 66 69 6e 65 64 20 |tch" is |defined |
|000013a0| 61 73 20 62 65 69 6e 67 | 7e 22 5c 6f 75 74 65 72 |as being|~"\outer|
|000013b0| 22 2e 20 41 73 7e 6c 6f | 6e 67 20 61 73 0a 25 74 |". As~lo|ng as.%t|
|000013c0| 68 65 20 22 5c 6f 75 74 | 65 72 22 20 6e 75 69 73 |he "\out|er" nuis|
|000013d0| 61 6e 63 65 20 70 72 65 | 76 61 69 6c 73 2c 20 77 |ance pre|vails, w|
|000013e0| 65 7e 6d 69 67 68 74 20 | 75 73 65 20 69 74 20 66 |e~might |use it f|
|000013f0| 6f 72 20 77 68 61 74 20 | 69 74 7e 69 73 0a 25 75 |or what |it~is.%u|
|00001400| 73 65 66 75 6c 7e 66 6f | 72 2e 0a 25 0a 25 54 68 |seful~fo|r..%.%Th|
|00001410| 61 74 27 73 20 61 6c 6c | 20 74 68 65 72 65 20 69 |at's all| there i|
|00001420| 73 20 74 6f 20 69 74 21 | 20 45 78 63 65 70 74 20 |s to it!| Except |
|00001430| 66 6f 72 20 74 68 65 20 | 22 5c 67 6c 6f 62 61 6c |for the |"\global|
|00001440| 22 20 69 73 73 75 65 20 | 77 65 20 70 72 6f 6d 69 |" issue |we promi|
|00001450| 73 65 64 0a 25 74 6f 20 | 65 78 70 6c 61 69 6e 5c |sed.%to |explain\|
|00001460| 64 6f 74 73 7b 7d 0a 25 | 55 73 75 61 6c 6c 79 20 |dots{}.%|Usually |
|00001470| 79 6f 75 20 77 69 6c 6c | 20 62 65 20 70 61 74 63 |you will| be patc|
|00001480| 68 69 6e 67 20 6d 61 63 | 72 6f 73 20 6f 66 20 73 |hing mac|ros of s|
|00001490| 6f 6d 65 20 73 74 79 6c | 65 2c 20 61 6e 64 20 74 |ome styl|e, and t|
|000014a0| 68 65 72 65 20 77 69 6c | 6c 20 62 65 20 6e 6f 0a |here wil|l be no.|
|000014b0| 25 70 6f 69 6e 74 20 69 | 6e 20 75 73 69 6e 67 7e |%point i|n using~|
|000014c0| 22 5c 70 61 74 63 68 22 | 20 69 6e 73 74 65 61 64 |"\patch"| instead|
|000014d0| 20 6f 66 7e 22 5c 67 70 | 61 74 63 68 22 2e 20 53 | of~"\gp|atch". S|
|000014e0| 6f 7e 6d 6f 73 74 6c 79 | 20 22 5c 67 70 61 74 63 |o~mostly| "\gpatc|
|000014f0| 68 22 20 64 6f 65 73 0a | 25 6e 6f 20 68 61 72 6d |h" does.|%no harm|
|00001500| 2c 20 61 6e 64 20 77 69 | 6c 6c 20 63 61 75 73 65 |, and wi|ll cause|
|00001510| 20 61 7e 67 6c 6f 62 61 | 6c 20 64 65 66 69 6e 69 | a~globa|l defini|
|00001520| 74 69 6f 6e 2e 20 22 5c | 70 61 74 63 68 22 2c 20 |tion. "\|patch", |
|00001530| 6f 6e 20 74 68 65 20 6f | 74 68 65 72 0a 25 68 61 |on the o|ther.%ha|
|00001540| 6e 64 2c 20 68 61 73 20 | 74 68 65 20 70 72 6f 62 |nd, has |the prob|
|00001550| 6c 65 6d 20 74 68 61 74 | 20 69 74 73 20 64 65 66 |lem that| its def|
|00001560| 69 6e 69 74 69 6f 6e 73 | 20 73 68 6f 75 6c 64 20 |initions| should |
|00001570| 68 6f 6c 64 20 69 6e 20 | 74 68 65 20 67 72 6f 75 |hold in |the grou|
|00001580| 70 0a 25 65 6e 64 65 64 | 20 62 79 7e 22 5c 65 6e |p.%ended| by~"\en|
|00001590| 64 70 61 74 63 68 22 2c | 20 62 75 74 20 6e 6f 74 |dpatch",| but not|
|000015a0| 20 67 6c 6f 62 61 6c 6c | 79 2e 20 53 6f 7e 22 5c | globall|y. So~"\|
|000015b0| 70 61 74 63 68 22 20 63 | 61 6e 6e 6f 74 20 6a 75 |patch" c|annot ju|
|000015c0| 73 74 20 6d 61 6b 65 0a | 25 74 68 65 20 64 65 66 |st make.|%the def|
|000015d0| 69 6e 69 74 69 6f 6e 73 | 2e 20 49 6e 73 74 65 61 |initions|. Instea|
|000015e0| 64 2c 20 69 74 20 63 6f | 6c 6c 65 63 74 73 20 74 |d, it co|llects t|
|000015f0| 68 65 20 6e 65 77 20 64 | 65 66 69 6e 69 74 69 6f |he new d|efinitio|
|00001600| 6e 73 2c 20 61 6e 64 7e | 64 6f 65 73 0a 25 74 68 |ns, and~|does.%th|
|00001610| 65 6d 20 61 6c 6c 20 61 | 74 7e 22 5c 65 6e 64 70 |em all a|t~"\endp|
|00001620| 61 74 63 68 22 2e 0a 25 | 0a 25 5c 44 65 73 63 72 |atch"..%|.%\Descr|
|00001630| 69 62 65 4d 61 63 72 6f | 7b 5c 67 6c 6f 62 61 6c |ibeMacro|{\global|
|00001640| 64 65 66 73 7d 0a 25 48 | 65 72 65 20 69 73 20 6f |defs}.%H|ere is o|
|00001650| 6e 65 20 66 72 69 65 6e | 64 6c 79 20 66 65 61 74 |ne frien|dly feat|
|00001660| 75 72 65 3a 20 49 66 20 | 22 5c 67 6c 6f 62 61 6c |ure: If |"\global|
|00001670| 64 65 66 73 22 20 69 73 | 20 6e 65 67 61 74 69 76 |defs" is| negativ|
|00001680| 65 2c 0a 25 22 5c 67 70 | 61 74 63 68 22 7e 77 69 |e,.%"\gp|atch"~wi|
|00001690| 6c 6c 20 69 6e 76 6f 6b | 65 20 22 5c 70 61 74 63 |ll invok|e "\patc|
|000016a0| 68 22 20 69 6e 73 74 65 | 61 64 20 6f 66 20 69 74 |h" inste|ad of it|
|000016b0| 73 20 6f 77 6e 20 62 65 | 68 61 76 69 6f 75 72 2c |s own be|haviour,|
|000016c0| 20 73 6f 20 74 68 61 74 | 0a 25 6c 6f 63 61 6c 20 | so that|.%local |
|000016d0| 70 61 74 63 68 65 73 20 | 77 69 6c 6c 20 62 65 20 |patches |will be |
|000016e0| 70 65 72 66 6f 72 6d 65 | 64 20 69 6e 73 74 65 61 |performe|d instea|
|000016f0| 64 20 6f 66 20 6e 6f 6e | 65 20 61 74 7e 61 6c 6c |d of non|e at~all|
|00001700| 20 28 73 69 6e 63 65 20 | 74 68 65 20 74 68 65 6e | (since |the then|
|00001710| 0a 25 6e 6f 6e 2d 67 6c | 6f 62 61 6c 20 64 65 66 |.%non-gl|obal def|
|00001720| 69 6e 69 74 69 6f 6e 20 | 77 6f 75 6c 64 20 64 69 |inition |would di|
|00001730| 73 61 70 70 65 61 72 20 | 61 74 7e 22 5c 65 6e 64 |sappear |at~"\end|
|00001740| 70 61 74 63 68 22 29 2e | 20 54 68 69 73 20 66 65 |patch").| This fe|
|00001750| 61 74 75 72 65 20 77 61 | 73 0a 25 64 65 65 6d 65 |ature wa|s.%deeme|
|00001760| 64 20 64 65 73 69 72 61 | 62 6c 65 5c 66 6f 6f 74 |d desira|ble\foot|
|00001770| 6e 6f 74 65 7b 52 65 61 | 73 6f 6e 3a 0a 25 49 7e |note{Rea|son:.%I~|
|00001780| 6d 61 64 65 20 61 6e 20 | 65 78 61 6d 70 6c 65 20 |made an |example |
|00001790| 66 69 6c 65 20 73 68 6f | 77 69 6e 67 20 74 68 65 |file sho|wing the|
|000017a0| 20 65 66 66 65 63 74 73 | 20 6f 66 20 73 65 76 65 | effects| of seve|
|000017b0| 72 61 6c 0a 25 22 5c 62 | 73 6c 61 73 68 20 64 6f |ral.%"\b|slash do|
|000017c0| 63 75 6d 65 6e 74 73 74 | 79 6c 65 22 20 63 6f 6d |cumentst|yle" com|
|000017d0| 6d 61 6e 64 73 20 77 69 | 74 68 20 6d 79 20 47 72 |mands wi|th my Gr|
|000017e0| 65 65 6b 20 6d 61 63 72 | 6f 20 73 65 74 2e 20 54 |eek macr|o set. T|
|000017f0| 68 65 20 47 72 65 65 6b | 20 73 74 79 6c 65 0a 25 |he Greek| style.%|
|00001800| 70 61 74 63 68 65 64 20 | 75 70 20 73 6f 6d 65 20 |patched |up some |
|00001810| 5c 4c 61 54 65 58 7b 7d | 20 6d 61 63 72 6f 73 2c |\LaTeX{}| macros,|
|00001820| 20 61 6e 64 20 74 68 69 | 73 20 77 61 73 20 77 61 | and thi|s was wa|
|00001830| 6e 74 65 64 20 6f 6e 6c | 79 0a 25 6c 6f 63 61 6c |nted onl|y.%local|
|00001840| 6c 79 2c 20 6e 61 6d 65 | 6c 79 20 66 6f 72 20 74 |ly, name|ly for t|
|00001850| 68 65 20 6c 65 6e 67 74 | 68 20 6f 66 20 74 68 65 |he lengt|h of the|
|00001860| 20 64 65 6d 6f 6e 73 74 | 72 61 74 69 6f 6e 20 6f | demonst|ration o|
|00001870| 66 20 6f 6e 65 20 70 61 | 72 74 69 63 75 6c 61 72 |f one pa|rticular|
|00001880| 0a 25 64 6f 63 75 6d 65 | 6e 74 20 73 74 79 6c 65 |.%docume|nt style|
|00001890| 2e 7d 2e 0a 25 5c 73 75 | 62 73 65 63 74 69 6f 6e |.}..%\su|bsection|
|000018a0| 7b 54 68 69 6e 67 73 20 | 74 6f 20 62 65 77 61 72 |{Things |to bewar|
|000018b0| 65 20 6f 66 20 28 61 6b | 61 20 62 75 67 73 29 7d |e of (ak|a bugs)}|
|000018c0| 0a 25 22 70 61 74 63 68 | 2e 64 6f 63 22 20 69 73 |.%"patch|.doc" is|
|000018d0| 20 61 20 76 65 72 79 20 | 73 69 6d 70 6c 65 20 70 | a very |simple p|
|000018e0| 61 63 6b 61 67 65 20 28 | 73 6f 72 74 7e 6f 66 29 |ackage (|sort~of)|
|000018f0| 2e 20 49 74 20 63 61 6e | 20 66 61 69 6c 20 66 6f |. It can| fail fo|
|00001900| 72 0a 25 61 7e 6e 75 6d | 62 65 72 20 6f 66 20 72 |r.%a~num|ber of r|
|00001910| 65 61 73 6f 6e 73 2c 20 | 61 6e 64 20 69 73 20 6e |easons, |and is n|
|00001920| 6f 74 20 61 70 70 6c 69 | 63 61 62 6c 65 20 69 6e |ot appli|cable in|
|00001930| 20 65 76 65 72 79 20 73 | 69 74 75 61 74 69 6f 6e | every s|ituation|
|00001940| 2e 20 59 6f 75 0a 25 77 | 69 6c 6c 20 68 61 76 65 |. You.%w|ill have|
|00001950| 20 70 72 6f 62 6c 65 6d | 73 20 69 66 0a 25 5c 62 | problem|s if.%\b|
|00001960| 65 67 69 6e 7b 65 6e 75 | 6d 65 72 61 74 65 7d 0a |egin{enu|merate}.|
|00001970| 25 5c 69 74 65 6d 20 59 | 6f 75 20 75 73 65 20 69 |%\item Y|ou use i|
|00001980| 6d 70 6c 69 63 69 74 20 | 74 6f 6b 65 6e 73 20 77 |mplicit |tokens w|
|00001990| 68 69 63 68 20 61 72 65 | 20 69 6d 70 6c 69 63 69 |hich are| implici|
|000019a0| 74 20 61 74 20 74 68 65 | 20 74 69 6d 65 20 74 68 |t at the| time th|
|000019b0| 65 0a 25 20 20 70 61 74 | 63 68 65 73 20 61 72 65 |e.% pat|ches are|
|000019c0| 20 61 70 70 6c 69 65 64 | 2e 20 22 5c 62 67 72 6f | applied|. "\bgro|
|000019d0| 75 70 22 20 61 6e 64 7e | 22 5c 65 67 72 6f 75 70 |up" and~|"\egroup|
|000019e0| 22 20 61 72 65 20 65 78 | 70 6c 69 63 69 74 6c 79 |" are ex|plicitly|
|000019f0| 20 64 69 73 61 62 6c 65 | 64 0a 25 20 20 66 6f 72 | disable|d.% for|
|00001a00| 20 74 68 69 73 20 72 65 | 61 73 6f 6e 2e 20 49 6d | this re|ason. Im|
|00001a10| 70 6c 69 63 69 74 20 73 | 70 61 63 65 73 20 77 69 |plicit s|paces wi|
|00001a20| 6c 6c 20 62 65 20 72 65 | 67 61 72 64 65 64 20 61 |ll be re|garded a|
|00001a30| 73 20 65 78 70 6c 69 63 | 69 74 20 6f 6e 65 73 0a |s explic|it ones.|
|00001a40| 25 20 20 62 79 7e 22 5c | 70 61 74 63 68 22 2e 20 |% by~"\|patch". |
|00001a50| 49 6d 70 6c 69 63 69 74 | 20 6d 61 63 72 6f 20 70 |Implicit| macro p|
|00001a60| 61 72 61 6d 65 74 65 72 | 20 63 68 61 72 61 63 74 |arameter| charact|
|00001a70| 65 72 73 20 49 7e 61 6d | 20 6e 6f 74 20 73 6f 20 |ers I~am| not so |
|00001a80| 73 75 72 65 0a 25 20 20 | 61 62 6f 75 74 2e 20 5c |sure.% |about. \|
|00001a90| 54 65 58 7e 62 65 68 61 | 76 65 73 20 70 72 65 74 |TeX~beha|ves pret|
|00001aa0| 74 79 20 77 69 65 72 64 | 20 77 69 74 68 20 72 65 |ty wierd| with re|
|00001ab0| 67 61 72 64 20 74 6f 20 | 74 68 65 6d 20 61 6e 79 |gard to |them any|
|00001ac0| 68 6f 77 2e 20 4f 74 68 | 65 72 0a 25 20 20 69 6d |how. Oth|er.% im|
|00001ad0| 70 6c 69 63 69 74 73 20 | 73 68 6f 75 6c 64 20 64 |plicits |should d|
|00001ae0| 6f 20 6e 6f 7e 68 61 72 | 6d 2e 20 22 5c 70 61 74 |o no~har|m. "\pat|
|00001af0| 63 68 22 7e 77 69 6c 6c | 20 74 61 6b 65 20 74 68 |ch"~will| take th|
|00001b00| 65 20 70 72 6f 62 6c 65 | 6d 61 74 69 63 0a 25 20 |e proble|matic.% |
|00001b10| 20 69 6d 70 6c 69 63 69 | 74 0a 25 20 20 74 6f 6b | implici|t.% tok|
|00001b20| 65 6e 73 20 66 6f 72 20 | 65 78 70 6c 69 63 69 74 |ens for |explicit|
|00001b30| 20 6f 6e 65 73 20 77 68 | 69 6c 65 20 69 74 20 69 | ones wh|ile it i|
|00001b40| 73 20 61 6e 61 6c 79 7a | 69 6e 67 20 74 6f 6b 65 |s analyz|ing toke|
|00001b50| 6e 73 2e 20 49 74 20 61 | 6e 61 6c 79 7a 65 73 0a |ns. It a|nalyzes.|
|00001b60| 25 20 20 62 6f 74 68 20 | 6d 61 74 63 68 69 6e 67 |% both |matching|
|00001b70| 20 61 6e 64 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 | and rep|lacement|
|00001b80| 20 74 6f 6b 65 6e 73 2c | 20 61 6e 64 20 61 6c 6c | tokens,| and all|
|00001b90| 20 74 6f 6b 65 6e 73 20 | 69 6e 20 74 68 65 20 6f | tokens |in the o|
|00001ba0| 72 69 67 69 6e 61 6c 0a | 25 20 20 6d 61 63 72 6f |riginal.|% macro|
|00001bb0| 20 75 70 20 74 6f 20 74 | 68 65 20 6c 61 73 74 20 | up to t|he last |
|00001bc0| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 70 65 72 66 |replacem|ent perf|
|00001bd0| 6f 72 6d 65 64 2e 20 54 | 68 69 73 20 6d 65 61 6e |ormed. T|his mean|
|00001be0| 73 20 74 68 61 74 2c 20 | 66 6f 72 0a 25 20 20 65 |s that, |for.% e|
|00001bf0| 78 61 6d 70 6c 65 2c 20 | 6d 61 74 63 68 69 6e 67 |xample, |matching|
|00001c00| 20 69 6d 70 6c 69 63 69 | 74 20 62 72 61 63 65 73 | implici|t braces|
|00001c10| 20 69 6e 20 6c 6f 63 61 | 74 69 6f 6e 73 20 77 68 | in loca|tions wh|
|00001c20| 65 72 65 20 79 6f 75 20 | 64 69 64 20 6e 6f 74 0a |ere you |did not.|
|00001c30| 25 20 20 69 6e 74 65 6e | 64 20 69 74 20 63 61 6e |% inten|d it can|
|00001c40| 20 6c 65 61 64 20 74 6f | 20 6d 69 73 6d 61 74 63 | lead to| mismatc|
|00001c50| 68 65 64 20 65 78 70 6c | 69 63 69 74 20 62 72 61 |hed expl|icit bra|
|00001c60| 63 65 73 20 61 6e 64 20 | 6c 6f 74 73 0a 25 20 20 |ces and |lots.% |
|00001c70| 6f 66 7e 63 6f 6e 66 75 | 73 69 6f 6e 2e 0a 25 5c |of~confu|sion..%\|
|00001c80| 69 74 65 6d 20 59 6f 75 | 20 75 73 65 20 6f 75 74 |item You| use out|
|00001c90| 65 72 20 74 6f 6b 65 6e | 73 20 69 6e 20 61 6e 79 |er token|s in any|
|00001ca0| 20 72 65 73 70 65 63 74 | 2e 0a 25 20 20 22 5c 70 | respect|..% "\p|
|00001cb0| 61 74 63 68 22 20 64 6f | 65 73 20 6e 6f 74 20 63 |atch" do|es not c|
|00001cc0| 61 72 65 20 66 6f 72 20 | 74 68 65 6d 2e 0a 25 5c |are for |them..%\|
|00001cd0| 69 74 65 6d 20 57 68 65 | 6e 20 22 5c 40 6e 64 70 |item Whe|n "\@ndp|
|00001ce0| 40 74 63 68 22 20 61 70 | 70 65 61 72 73 20 61 6e |@tch" ap|pears an|
|00001cf0| 79 77 68 65 72 65 2c 20 | 6e 61 6d 65 6c 79 20 69 |ywhere, |namely i|
|00001d00| 6e 20 61 7e 6d 61 63 72 | 6f 20 74 6f 20 62 65 0a |n a~macr|o to be.|
|00001d10| 25 20 20 70 61 74 63 68 | 65 64 2c 20 6f 72 20 69 |% patch|ed, or i|
|00001d20| 6e 20 61 20 6d 61 74 63 | 68 69 6e 67 20 6f 72 20 |n a matc|hing or |
|00001d30| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 73 65 71 75 |replacem|ent sequ|
|00001d40| 65 6e 63 65 2e 20 49 74 | 7e 69 73 20 75 73 65 64 |ence. It|~is used|
|00001d50| 20 66 6f 72 0a 25 20 20 | 69 6e 74 65 72 6e 61 6c | for.% |internal|
|00001d60| 20 70 75 72 70 6f 73 65 | 73 2c 20 61 6e 64 20 79 | purpose|s, and y|
|00001d70| 6f 75 20 63 61 6e 20 63 | 61 75 73 65 20 6c 6f 74 |ou can c|ause lot|
|00001d80| 73 20 6f 66 20 63 6f 6e | 66 75 73 69 6f 6e 20 77 |s of con|fusion w|
|00001d90| 68 65 6e 0a 25 20 20 75 | 73 69 6e 67 7e 69 74 2e |hen.% u|sing~it.|
|00001da0| 20 54 68 69 73 20 6d 65 | 61 6e 73 2c 20 66 6f 72 | This me|ans, for|
|00001db0| 20 6f 6e 65 20 74 68 69 | 6e 67 2c 20 74 68 61 74 | one thi|ng, that|
|00001dc0| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 | you sho|uld not |
|00001dd0| 74 72 79 0a 25 20 20 22 | 5c 70 61 74 63 68 22 69 |try.% "|\patch"i|
|00001de0| 6e 67 20 75 70 20 61 6e | 79 20 6d 61 63 72 6f 73 |ng up an|y macros|
|00001df0| 20 6f 66 20 74 68 69 73 | 20 70 61 63 6b 61 67 65 | of this| package|
|00001e00| 20 77 69 74 68 20 69 74 | 73 65 6c 66 2e 0a 25 5c | with it|self..%\|
|00001e10| 69 74 65 6d 20 41 6e 64 | 20 74 68 69 73 20 69 73 |item And| this is|
|00001e20| 20 68 61 72 73 68 3a 20 | 69 66 20 74 68 65 20 6d | harsh: |if the m|
|00001e30| 61 63 72 6f 20 79 6f 75 | 20 70 61 74 63 68 20 63 |acro you| patch c|
|00001e40| 6f 6e 74 61 69 6e 73 20 | 22 23 22 20 6d 61 72 6b |ontains |"#" mark|
|00001e50| 73 0a 25 20 20 28 77 68 | 69 63 68 20 6f 72 69 67 |s.% (wh|ich orig|
|00001e60| 69 6e 61 6c 6c 79 20 77 | 65 72 65 20 70 72 6f 64 |inally w|ere prod|
|00001e70| 75 63 65 64 20 62 79 20 | 77 72 69 74 69 6e 67 20 |uced by |writing |
|00001e80| 22 23 23 22 29 20 74 68 | 65 73 65 20 77 69 6c 6c |"##") th|ese will|
|00001e90| 20 6e 6f 74 20 62 65 0a | 25 20 20 72 65 64 75 70 | not be.|% redup|
|00001ea0| 6c 69 63 61 74 65 64 2c | 20 6c 65 61 64 69 6e 67 |licated,| leading|
|00001eb0| 20 74 6f 20 6d 69 73 73 | 69 6e 67 20 70 61 72 61 | to miss|ing para|
|00001ec0| 6d 65 74 65 72 20 6e 75 | 6d 62 65 72 20 65 72 72 |meter nu|mber err|
|00001ed0| 6f 72 73 20 28 77 68 69 | 63 68 20 77 69 6c 6c 0a |ors (whi|ch will.|
|00001ee0| 25 20 20 64 6f 20 74 68 | 65 20 72 69 67 68 74 20 |% do th|e right |
|00001ef0| 74 68 69 6e 67 20 69 66 | 20 79 6f 75 20 69 67 6e |thing if| you ign|
|00001f00| 6f 72 65 20 74 68 65 6d | 2c 20 62 75 74 20 74 68 |ore them|, but th|
|00001f10| 61 74 27 73 20 75 67 6c | 79 29 2c 20 6f 72 20 74 |at's ugl|y), or t|
|00001f20| 6f 0a 25 20 20 72 65 63 | 6f 6d 62 69 6e 61 74 69 |o.% rec|ombinati|
|00001f30| 6f 6e 20 77 69 74 68 20 | 61 20 66 6f 6c 6c 6f 77 |on with |a follow|
|00001f40| 69 6e 67 20 6e 75 6d 62 | 65 72 2c 20 77 68 69 63 |ing numb|er, whic|
|00001f50| 68 20 69 73 20 70 6c 61 | 69 6e 20 77 72 6f 6e 67 |h is pla|in wrong|
|00001f60| 2e 20 59 6f 75 20 63 61 | 6e 0a 25 20 20 77 6f 72 |. You ca|n.% wor|
|00001f70| 6b 20 61 72 6f 75 6e 64 | 20 74 68 69 73 20 75 67 |k around| this ug|
|00001f80| 6c 69 6e 65 73 73 20 69 | 6e 20 61 6e 7e 75 67 6c |liness i|n an~ugl|
|00001f90| 79 20 77 61 79 3a 20 73 | 70 65 63 69 66 79 20 61 |y way: s|pecify a|
|00001fa0| 7e 72 65 70 6c 61 63 65 | 6d 65 6e 74 0a 25 20 20 |~replace|ment.% |
|00001fb0| 22 23 7b 23 23 7d 22 20 | 66 6f 72 20 61 6e 79 20 |"#{##}" |for any |
|00001fc0| 73 75 63 68 20 74 6f 6b | 65 6e 2e 20 49 7e 61 6d |such tok|en. I~am|
|00001fd0| 20 70 72 65 74 74 79 20 | 6d 75 63 68 20 61 66 72 | pretty |much afr|
|00001fe0| 61 69 64 20 49 7e 6b 6e | 6f 77 20 6e 6f 0a 25 20 |aid I~kn|ow no.% |
|00001ff0| 20 62 65 74 74 65 72 20 | 77 61 79 20 61 72 6f 75 | better |way arou|
|00002000| 6e 64 20 74 68 69 73 20 | 6f 6e 65 2e 0a 25 5c 69 |nd this |one..%\i|
|00002010| 74 65 6d 20 53 69 6e 63 | 65 20 22 5c 62 67 72 6f |tem Sinc|e "\bgro|
|00002020| 75 70 22 20 61 6e 64 7e | 22 5c 65 67 72 6f 75 70 |up" and~|"\egroup|
|00002030| 22 20 61 72 65 20 64 69 | 73 61 62 6c 65 64 2c 20 |" are di|sabled, |
|00002040| 75 73 69 6e 67 20 61 6e | 79 20 6d 61 63 72 6f 20 |using an|y macro |
|00002050| 74 68 61 74 0a 25 20 20 | 69 6e 20 74 75 72 6e 20 |that.% |in turn |
|00002060| 75 73 65 73 20 74 68 6f | 73 65 20 77 69 6c 6c 20 |uses tho|se will |
|00002070| 6e 6f 74 20 77 6f 72 6b | 20 77 68 69 6c 65 20 69 |not work| while i|
|00002080| 6e 20 70 61 74 63 68 7e | 6d 6f 64 65 2e 20 57 68 |n patch~|mode. Wh|
|00002090| 61 74 0a 25 20 20 49 7e | 67 75 61 72 61 6e 74 65 |at.% I~|guarante|
|000020a0| 65 20 74 6f 20 6b 65 65 | 70 20 77 6f 72 6b 69 6e |e to kee|p workin|
|000020b0| 67 20 69 6e 20 66 75 74 | 75 72 65 20 76 65 72 73 |g in fut|ure vers|
|000020c0| 69 6f 6e 73 20 69 73 20 | 22 5c 6c 65 74 22 20 28 |ions is |"\let" (|
|000020d0| 6c 6f 63 61 6c 6c 79 2c | 0a 25 20 20 66 6f 72 20 |locally,|.% for |
|000020e0| 6d 61 6b 69 6e 67 20 69 | 6d 70 6c 69 63 69 74 20 |making i|mplicit |
|000020f0| 74 6f 6b 65 6e 73 29 2c | 0a 25 20 20 61 6c 6c 20 |tokens),|.% all |
|00002100| 65 78 70 61 6e 64 61 62 | 6c 65 20 63 6f 6e 73 74 |expandab|le const|
|00002110| 72 75 63 74 73 20 28 6c | 69 6b 65 20 63 6f 6e 64 |ructs (l|ike cond|
|00002120| 69 74 69 6f 6e 61 6c 73 | 29 20 6e 6f 74 0a 25 20 |itionals|) not.% |
|00002130| 20 75 73 69 6e 67 20 61 | 6e 79 20 6f 66 20 74 68 | using a|ny of th|
|00002140| 65 20 6d 61 63 72 6f 73 | 20 6f 66 20 74 68 69 73 |e macros| of this|
|00002150| 20 70 61 63 6b 61 67 65 | 2c 20 61 6e 64 7e 22 5c | package|, and~"\|
|00002160| 70 61 74 63 68 22 65 73 | 2e 0a 25 20 20 4f 74 68 |patch"es|..% Oth|
|00002170| 65 72 20 74 68 69 6e 67 | 73 20 61 72 65 20 6e 6f |er thing|s are no|
|00002180| 74 20 6e 65 63 65 73 73 | 61 72 69 6c 79 20 73 75 |t necess|arily su|
|00002190| 70 70 6f 72 74 65 64 20 | 69 6e 20 70 61 74 63 68 |pported |in patch|
|000021a0| 7e 6d 6f 64 65 2e 0a 25 | 20 20 53 70 65 63 69 66 |~mode..%| Specif|
|000021b0| 69 63 61 6c 6c 79 2c 20 | 64 6f 20 6e 6f 74 20 75 |ically, |do not u|
|000021c0| 73 65 20 22 5c 64 65 66 | 22 20 6f 72 7e 22 5c 67 |se "\def|" or~"\g|
|000021d0| 64 65 66 22 2c 20 73 69 | 6e 63 65 20 6d 61 6e 69 |def", si|nce mani|
|000021e0| 70 75 6c 61 74 69 6f 6e | 20 6f 66 0a 25 20 20 6c |pulation| of.% l|
|000021f0| 6f 63 61 6c 6e 65 73 73 | 20 6d 69 67 68 74 20 75 |ocalness| might u|
|00002200| 6e 6e 65 63 65 73 73 61 | 72 69 6c 79 20 62 65 20 |nnecessa|rily be |
|00002210| 74 68 77 61 72 74 65 64 | 20 69 66 20 79 6f 75 7e |thwarted| if you~|
|00002220| 64 6f 2e 0a 25 5c 69 74 | 65 6d 20 44 6f 20 6e 6f |do..%\it|em Do no|
|00002230| 74 20 63 68 61 6e 67 65 | 20 22 5c 74 6f 6b 73 40 |t change| "\toks@|
|00002240| 22 20 69 6e 20 61 6e 79 | 20 77 61 79 2c 20 6f 72 |" in any| way, or|
|00002250| 20 75 73 65 20 61 7e 6d | 61 63 72 6f 20 63 68 61 | use a~m|acro cha|
|00002260| 6e 67 69 6e 67 20 69 74 | 2e 0a 25 20 20 43 61 6e |nging it|..% Can|
|00002270| 6e 6f 74 20 68 61 70 70 | 65 6e 20 72 65 61 6c 6c |not happ|en reall|
|00002280| 79 2c 20 69 66 20 79 6f | 75 20 6c 69 73 74 65 6e |y, if yo|u listen|
|00002290| 20 74 6f 20 74 68 65 20 | 6c 61 73 74 20 61 64 76 | to the |last adv|
|000022a0| 69 63 65 2e 0a 25 5c 69 | 74 65 6d 20 44 6f 20 6e |ice..%\i|tem Do n|
|000022b0| 6f 74 20 72 65 6c 79 20 | 6f 6e 20 74 68 65 20 70 |ot rely |on the p|
|000022c0| 61 74 63 68 65 73 20 65 | 69 74 68 65 72 20 74 61 |atches e|ither ta|
|000022d0| 6b 69 6e 67 20 70 6c 61 | 63 65 20 6f 72 20 6e 6f |king pla|ce or no|
|000022e0| 74 20 62 65 66 6f 72 65 | 20 74 68 65 0a 25 20 20 |t before| the.% |
|000022f0| 66 69 6e 61 6c 20 22 5c | 65 6e 64 70 61 74 63 68 |final "\|endpatch|
|00002300| 22 21 20 54 68 69 73 20 | 6d 65 61 6e 73 2c 20 64 |"! This |means, d|
|00002310| 6f 20 6e 6f 74 20 75 73 | 65 20 61 7e 70 61 74 63 |o not us|e a~patc|
|00002320| 68 65 64 20 6d 61 63 72 | 6f 20 62 65 66 6f 72 65 |hed macr|o before|
|00002330| 0a 25 20 20 22 5c 65 6e | 64 70 61 74 63 68 22 20 |.% "\en|dpatch" |
|00002340| 69 6e 20 77 61 79 73 20 | 77 68 69 63 68 20 72 65 |in ways |which re|
|00002350| 71 75 69 72 65 20 73 70 | 65 63 69 66 69 63 61 6c |quire sp|ecifical|
|00002360| 6c 79 20 74 68 65 20 70 | 61 74 63 68 65 64 20 6f |ly the p|atched o|
|00002370| 72 0a 25 20 20 74 68 65 | 20 75 6e 70 61 74 63 68 |r.% the| unpatch|
|00002380| 65 64 20 76 65 72 73 69 | 6f 6e 2e 20 46 6f 72 20 |ed versi|on. For |
|00002390| 65 78 61 6d 70 6c 65 2c | 20 64 6f 20 6e 6f 74 20 |example,| do not |
|000023a0| 70 61 74 63 68 20 6f 6e | 65 20 61 6e 64 20 74 68 |patch on|e and th|
|000023b0| 65 20 73 61 6d 65 20 6d | 61 63 72 6f 0a 25 20 20 |e same m|acro.% |
|000023c0| 77 69 74 68 20 74 77 6f | 20 73 65 70 61 72 61 74 |with two| separat|
|000023d0| 65 20 22 5c 70 61 74 63 | 68 22 20 63 6f 6d 6d 61 |e "\patc|h" comma|
|000023e0| 6e 64 73 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |nds in t|he same |
|000023f0| 70 61 74 63 68 20 73 65 | 73 73 69 6f 6e 21 20 54 |patch se|ssion! T|
|00002400| 68 65 0a 25 20 20 72 65 | 61 73 6f 6e 20 66 6f 72 |he.% re|ason for|
|00002410| 20 74 68 69 73 20 69 73 | 20 74 68 65 20 63 6f 6c | this is| the col|
|00002420| 6c 65 63 74 69 6e 67 20 | 62 65 68 61 76 69 6f 75 |lecting |behaviou|
|00002430| 72 20 66 6f 72 20 6e 6f | 6e 2d 67 6c 6f 62 61 6c |r for no|n-global|
|00002440| 20 70 61 74 63 68 65 73 | 2e 0a 25 20 20 41 6e 64 | patches|..% And|
|00002450| 20 79 6f 75 20 6e 65 76 | 65 72 20 72 65 61 6c 6c | you nev|er reall|
|00002460| 79 20 6b 6e 6f 77 20 77 | 68 65 6e 20 61 7e 70 61 |y know w|hen a~pa|
|00002470| 63 6b 61 67 65 20 6f 66 | 20 79 6f 75 72 73 20 6d |ckage of| yours m|
|00002480| 69 67 68 74 20 63 6f 6d | 65 20 68 61 6e 64 79 0a |ight com|e handy.|
|00002490| 25 20 20 6e 6f 6e 2d 67 | 6c 6f 62 61 6c 6c 79 2e |% non-g|lobally.|
|000024a0| 0a 25 5c 69 74 65 6d 20 | 46 6f 72 20 73 69 6d 69 |.%\item |For simi|
|000024b0| 6c 61 72 20 72 65 61 73 | 6f 6e 73 2c 0a 25 20 20 |lar reas|ons,.% |
|000024c0| 64 6f 20 6e 6f 74 20 75 | 73 65 20 22 5c 69 6e 70 |do not u|se "\inp|
|000024d0| 75 74 20 70 61 74 63 68 | 2e 74 65 78 22 20 69 6e |ut patch|.tex" in|
|000024e0| 20 61 20 6c 6f 63 61 6c | 20 67 72 6f 75 70 20 77 | a local| group w|
|000024f0| 68 65 6e 20 79 6f 75 20 | 61 72 65 20 64 6f 69 6e |hen you |are doin|
|00002500| 67 0a 25 20 20 22 5c 67 | 70 61 74 63 68 22 65 73 |g.% "\g|patch"es|
|00002510| 20 28 75 6e 6c 65 73 73 | 20 79 6f 75 20 6b 6e 6f | (unless| you kno|
|00002520| 77 20 77 68 61 74 20 79 | 6f 75 20 61 72 65 20 64 |w what y|ou are d|
|00002530| 6f 69 6e 67 2c 20 61 73 | 20 69 6e 20 74 68 65 20 |oing, as| in the |
|00002540| 63 61 73 65 20 6f 66 0a | 25 20 20 6e 65 67 61 74 |case of.|% negat|
|00002550| 69 76 65 7e 22 5c 67 6c | 6f 62 61 6c 64 65 66 73 |ive~"\gl|obaldefs|
|00002560| 22 29 2e 20 49 74 7e 6d | 69 67 68 74 20 67 65 74 |"). It~m|ight get|
|00002570| 20 74 6f 7e 62 65 69 6e | 67 20 61 7e 70 72 6f 62 | to~bein|g a~prob|
|00002580| 6c 65 6d 20 73 6f 6d 65 | 74 69 6d 65 2e 0a 25 5c |lem some|time..%\|
|00002590| 69 74 65 6d 20 4e 65 76 | 65 72 20 73 65 74 20 22 |item Nev|er set "|
|000025a0| 5c 67 6c 6f 62 61 6c 64 | 65 66 73 22 20 74 6f 20 |\globald|efs" to |
|000025b0| 61 7e 6e 6f 6e 2d 7a 65 | 72 6f 20 7b 5c 65 6d 20 |a~non-ze|ro {\em |
|000025c0| 70 6f 73 69 74 69 76 65 | 5c 2f 7d 20 76 61 6c 75 |positive|\/} valu|
|000025d0| 65 0a 25 20 20 77 68 69 | 6c 65 20 77 6f 72 6b 69 |e.% whi|le worki|
|000025e0| 6e 67 20 77 69 74 68 7e | 22 5c 70 61 74 63 68 22 |ng with~|"\patch"|
|000025f0| 2c 20 73 69 6e 63 65 20 | 69 74 20 77 69 6c 6c 20 |, since |it will |
|00002600| 69 6e 74 65 72 66 65 72 | 65 20 64 69 73 61 73 74 |interfer|e disast|
|00002610| 72 6f 75 73 6c 79 20 77 | 69 74 68 0a 25 20 20 22 |rously w|ith.% "|
|00002620| 70 61 74 63 68 2e 74 65 | 78 22 27 73 20 69 6e 74 |patch.te|x"'s int|
|00002630| 65 72 6e 61 6c 73 2c 20 | 77 68 69 63 68 20 68 65 |ernals, |which he|
|00002640| 61 76 69 6c 79 20 77 6f | 72 6b 20 77 69 74 68 20 |avily wo|rk with |
|00002650| 6c 6f 63 61 6c 20 67 72 | 6f 75 70 73 2e 0a 25 20 |local gr|oups..% |
|00002660| 20 41 6e 79 77 61 79 2c | 20 22 70 61 74 63 68 2e | Anyway,| "patch.|
|00002670| 74 65 78 22 20 69 73 20 | 62 79 20 69 74 73 20 6e |tex" is |by its n|
|00002680| 61 74 75 72 65 20 69 6e | 74 65 6e 64 65 64 20 66 |ature in|tended f|
|00002690| 6f 72 20 6c 6f 63 61 6c | 20 75 73 65 20 6f 6e 6c |or local| use onl|
|000026a0| 79 2e 0a 25 5c 69 74 65 | 6d 20 4a 75 73 74 20 61 |y..%\ite|m Just a|
|000026b0| 73 20 61 20 6e 6f 74 65 | 20 61 73 69 64 65 3a 20 |s a note| aside: |
|000026c0| 69 74 20 69 73 20 61 7e | 76 65 72 79 20 62 61 64 |it is a~|very bad|
|000026d0| 20 69 64 65 61 20 74 6f | 20 73 65 74 20 22 5c 67 | idea to| set "\g|
|000026e0| 6c 6f 62 61 6c 64 65 66 | 73 22 0a 25 20 20 74 6f |lobaldef|s".% to|
|000026f0| 20 6e 6f 6e 2d 7a 65 72 | 6f 20 76 61 6c 75 65 73 | non-zer|o values|
|00002700| 20 6c 6f 6e 67 65 72 20 | 74 68 61 6e 20 73 74 72 | longer |than str|
|00002710| 69 63 74 6c 79 20 6e 65 | 63 65 73 73 61 72 79 2e |ictly ne|cessary.|
|00002720| 20 49 74 20 69 73 20 65 | 73 70 65 63 69 61 6c 6c | It is e|speciall|
|00002730| 79 0a 25 20 20 61 7e 62 | 61 64 20 69 64 65 61 20 |y.% a~b|ad idea |
|00002740| 74 6f 20 73 65 74 20 69 | 74 20 74 6f 20 61 7e 6e |to set i|t to a~n|
|00002750| 65 67 61 74 69 76 65 20 | 76 61 6c 75 65 20 77 68 |egative |value wh|
|00002760| 69 6c 65 20 7b 5c 65 6d | 20 74 79 70 65 73 65 74 |ile {\em| typeset|
|00002770| 74 69 6e 67 5c 2f 7d 0a | 25 20 20 61 6e 79 74 68 |ting\/}.|% anyth|
|00002780| 69 6e 67 2c 0a 25 20 20 | 62 65 63 61 75 73 65 20 |ing,.% |because |
|00002790| 74 68 65 20 6f 75 74 70 | 75 74 20 72 6f 75 74 69 |the outp|ut routi|
|000027a0| 6e 65 20 28 69 6d 70 6c | 69 63 69 74 6c 79 20 65 |ne (impl|icitly e|
|000027b0| 6e 63 6c 6f 73 65 64 20 | 69 6e 20 61 7e 67 72 6f |nclosed |in a~gro|
|000027c0| 75 70 29 20 77 69 6c 6c | 0a 25 20 20 6e 65 76 65 |up) will|.% neve|
|000027d0| 72 20 62 65 20 61 62 6c | 65 20 74 6f 20 67 65 74 |r be abl|e to get|
|000027e0| 20 61 6e 79 74 68 69 6e | 67 20 64 6f 6e 65 20 70 | anythin|g done p|
|000027f0| 65 72 6d 61 6e 65 6e 74 | 6c 79 2c 20 61 6e 64 20 |ermanent|ly, and |
|00002800| 77 69 6c 6c 20 74 68 65 | 72 65 66 6f 72 65 0a 25 |will the|refore.%|
|00002810| 20 20 62 65 20 72 65 70 | 65 61 74 65 64 20 6f 76 | be rep|eated ov|
|00002820| 65 72 20 61 6e 64 7e 6f | 76 65 72 2e 0a 25 5c 65 |er and~o|ver..%\e|
|00002830| 6e 64 7b 65 6e 75 6d 65 | 72 61 74 65 7d 0a 25 0a |nd{enume|rate}.%.|
|00002840| 25 4f 6b 2c 20 74 68 69 | 73 20 73 68 6f 75 6c 64 |%Ok, thi|s should|
|00002850| 20 62 65 20 61 6c 6c 20 | 74 68 65 72 65 20 72 65 | be all |there re|
|00002860| 61 6c 6c 79 20 69 73 20 | 74 6f 20 69 74 2e 20 49 |ally is |to it. I|
|00002870| 66 20 49 7e 6c 6f 6f 6b | 20 74 68 61 74 20 6c 69 |f I~look| that li|
|00002880| 73 74 20 6f 76 65 72 0a | 25 61 67 61 69 6e 2c 20 |st over.|%again, |
|00002890| 69 74 20 73 65 65 6d 73 | 20 6c 69 6b 65 20 67 72 |it seems| like gr|
|000028a0| 6f 75 70 73 20 72 65 61 | 6c 6c 79 20 6f 63 63 75 |oups rea|lly occu|
|000028b0| 70 79 20 6d 79 20 66 61 | 6e 74 61 73 79 2e 0a 25 |py my fa|ntasy..%|
|000028c0| 0a 25 48 61 70 70 79 20 | 22 5c 70 61 74 63 68 22 |.%Happy |"\patch"|
|000028d0| 69 6e 67 21 0a 25 5c 53 | 74 6f 70 45 76 65 6e 74 |ing!.%\S|topEvent|
|000028e0| 75 61 6c 6c 79 7b 5c 50 | 72 69 6e 74 49 6e 64 65 |ually{\P|rintInde|
|000028f0| 78 7d 0a 25 5c 73 65 63 | 74 69 6f 6e 7b 54 68 65 |x}.%\sec|tion{The|
|00002900| 20 49 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 7d | Impleme|ntation}|
|00002910| 0a 25 57 65 20 62 65 67 | 69 6e 20 62 79 20 6f 70 |.%We beg|in by op|
|00002920| 65 6e 69 6e 67 20 6f 75 | 72 20 6c 6f 63 61 6c 20 |ening ou|r local |
|00002930| 67 72 6f 75 70 20 61 6e | 64 20 6d 61 6b 69 6e 67 |group an|d making|
|00002940| 20 70 72 69 76 61 74 65 | 20 63 6f 6e 74 72 6f 6c | private| control|
|00002950| 0a 25 73 65 71 75 65 6e | 63 65 73 20 61 63 63 65 |.%sequen|ces acce|
|00002960| 73 73 69 62 6c 65 3a 0a | 25 20 20 20 20 5c 62 65 |ssible:.|% \be|
|00002970| 67 69 6e 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 0a 5c |gin{macr|ocode}.\|
|00002980| 62 65 67 69 6e 67 72 6f | 75 70 0a 5c 63 61 74 63 |begingro|up.\catc|
|00002990| 6f 64 65 60 40 3d 31 31 | 0a 25 20 20 20 20 5c 65 |ode`@=11|.% \e|
|000029a0| 6e 64 7b 6d 61 63 72 6f | 63 6f 64 65 7d 0a 25 57 |nd{macro|code}.%W|
|000029b0| 65 20 74 68 65 6e 20 73 | 65 74 20 22 5c 74 6f 6b |e then s|et "\tok|
|000029c0| 73 40 22 20 74 6f 20 74 | 68 65 20 69 6e 69 74 69 |s@" to t|he initi|
|000029d0| 61 6c 20 73 65 74 20 6f | 66 7e 61 63 74 69 6f 6e |al set o|f~action|
|000029e0| 73 20 74 6f 7e 70 65 72 | 66 6f 72 6d 20 61 74 20 |s to~per|form at |
|000029f0| 74 68 65 0a 25 65 6e 64 | 20 6f 66 20 74 68 65 7e |the.%end| of the~|
|00002a00| 70 61 74 63 68 65 73 2e | 0a 25 20 20 20 20 5c 62 |patches.|.% \b|
|00002a10| 65 67 69 6e 7b 6d 61 63 | 72 6f 63 6f 64 65 7d 0a |egin{mac|rocode}.|
|00002a20| 5c 74 6f 6b 73 40 3d 7b | 5c 65 6e 64 67 72 6f 75 |\toks@={|\endgrou|
|00002a30| 70 7d 0a 25 20 20 20 20 | 5c 65 6e 64 7b 6d 61 63 |p}.% |\end{mac|
|00002a40| 72 6f 63 6f 64 65 7d 0a | 25 20 5c 62 65 67 69 6e |rocode}.|% \begin|
|00002a50| 7b 6d 61 63 72 6f 7d 7b | 5c 65 6e 64 70 61 74 63 |{macro}{|\endpatc|
|00002a60| 68 7d 0a 25 20 20 20 20 | 52 61 74 68 65 72 20 73 |h}.% |Rather s|
|00002a70| 69 6d 70 6c 65 2e 20 22 | 5c 6f 75 74 65 72 22 7e |imple. "|\outer"~|
|00002a80| 73 65 65 6d 73 20 6e 6f | 74 20 74 6f 20 64 6f 20 |seems no|t to do |
|00002a90| 6d 75 63 68 20 68 61 72 | 6d 20 68 65 72 65 2e 20 |much har|m here. |
|00002aa0| 49 74 20 6d 69 67 68 74 | 0a 25 20 20 20 20 68 65 |It might|.% he|
|00002ab0| 6c 70 20 62 65 74 74 65 | 72 20 70 69 6e 70 6f 69 |lp bette|r pinpoi|
|00002ac0| 6e 74 69 6e 67 20 73 65 | 76 65 72 65 20 66 61 69 |nting se|vere fai|
|00002ad0| 6c 75 72 65 73 20 77 68 | 65 6e 20 75 73 69 6e 67 |lures wh|en using|
|00002ae0| 7e 22 5c 70 61 74 63 68 | 22 2e 0a 25 20 20 20 20 |~"\patch|"..% |
|00002af0| 5c 62 65 67 69 6e 7b 6d | 61 63 72 6f 63 6f 64 65 |\begin{m|acrocode|
|00002b00| 7d 0a 5c 6f 75 74 65 72 | 5c 64 65 66 5c 65 6e 64 |}.\outer|\def\end|
|00002b10| 70 61 74 63 68 7b 5c 74 | 68 65 5c 74 6f 6b 73 40 |patch{\t|he\toks@|
|00002b20| 7d 0a 25 20 20 20 20 5c | 65 6e 64 7b 6d 61 63 72 |}.% \|end{macr|
|00002b30| 6f 63 6f 64 65 7d 0a 25 | 20 5c 65 6e 64 7b 6d 61 |ocode}.%| \end{ma|
|00002b40| 63 72 6f 7d 0a 25 20 5c | 62 65 67 69 6e 7b 6d 61 |cro}.% \|begin{ma|
|00002b50| 63 72 6f 7d 7b 5c 66 75 | 74 75 72 65 64 65 66 7d |cro}{\fu|turedef}|
|00002b60| 0a 25 20 20 20 20 54 68 | 69 73 20 69 73 20 73 6f |.% Th|is is so|
|00002b70| 6d 65 77 68 61 74 20 73 | 69 6d 69 6c 61 72 20 74 |mewhat s|imilar t|
|00002b80| 6f 20 22 5c 66 75 74 75 | 72 65 6c 65 74 22 2c 20 |o "\futu|relet", |
|00002b90| 6f 6e 6c 79 20 6e 6f 74 | 20 61 74 7e 61 6c 6c 2e |only not| at~all.|
|00002ba0| 20 49 74 0a 25 20 20 20 | 20 64 65 66 69 6e 65 73 | It.% | defines|
|00002bb0| 20 74 68 65 20 6d 61 63 | 72 6f 20 77 68 69 63 68 | the mac|ro which|
|00002bc0| 20 69 73 20 69 74 73 20 | 66 69 72 73 74 20 61 72 | is its |first ar|
|00002bd0| 67 75 6d 65 6e 74 20 61 | 73 7e 63 6f 64 65 20 77 |gument a|s~code w|
|00002be0| 68 69 63 68 20 63 61 6e | 0a 25 20 20 20 20 62 79 |hich can|.% by|
|00002bf0| 20 75 73 65 20 6f 66 7e | 22 5c 61 66 74 65 72 67 | use of~|"\afterg|
|00002c00| 72 6f 75 70 22 20 72 65 | 70 72 6f 64 75 63 65 20 |roup" re|produce |
|00002c10| 74 68 65 20 74 68 69 72 | 64 20 61 72 67 75 6d 65 |the thir|d argume|
|00002c20| 6e 74 7e 74 6f 6b 65 6e | 2c 0a 25 20 20 20 20 61 |nt~token|,.% a|
|00002c30| 6e 64 20 61 66 74 65 72 | 20 64 6f 69 6e 67 20 74 |nd after| doing t|
|00002c40| 68 61 74 20 69 74 20 77 | 69 6c 6c 20 63 61 6c 6c |hat it w|ill call|
|00002c50| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 61 72 67 75 | the sec|ond argu|
|00002c60| 6d 65 6e 74 2e 0a 25 20 | 20 20 20 41 6c 6c 7e 61 |ment..% | All~a|
|00002c70| 72 67 75 6d 65 6e 74 73 | 20 61 72 65 20 72 65 6d |rguments| are rem|
|00002c80| 6f 76 65 64 20 66 72 6f | 6d 20 74 68 65 20 69 6e |oved fro|m the in|
|00002c90| 70 75 74 2c 20 75 6e 6c | 69 6b 65 20 22 5c 66 75 |put, unl|ike "\fu|
|00002ca0| 74 75 72 65 6c 65 74 22 | 27 73 0a 25 20 20 20 20 |turelet"|'s.% |
|00002cb0| 62 65 68 61 76 69 6f 75 | 72 2e 0a 25 20 20 20 20 |behaviou|r..% |
|00002cc0| 5c 62 65 67 69 6e 7b 6d | 61 63 72 6f 63 6f 64 65 |\begin{m|acrocode|
|00002cd0| 7d 0a 5c 64 65 66 5c 66 | 75 74 75 72 65 64 65 66 |}.\def\f|uturedef|
|00002ce0| 23 31 23 32 7b 5c 62 65 | 67 69 6e 67 72 6f 75 70 |#1#2{\be|gingroup|
|00002cf0| 0a 25 20 20 20 20 5c 65 | 6e 64 7b 6d 61 63 72 6f |.% \e|nd{macro|
|00002d00| 63 6f 64 65 7d 0a 25 20 | 20 20 20 57 65 20 64 6f |code}.% | We do|
|00002d10| 20 74 68 69 73 20 6c 6f | 63 61 6c 6c 79 2c 20 61 | this lo|cally, a|
|00002d20| 6e 64 20 73 65 74 20 75 | 70 20 61 20 66 65 77 20 |nd set u|p a few |
|00002d30| 74 68 69 6e 67 73 20 74 | 6f 20 64 6f 20 61 66 74 |things t|o do aft|
|00002d40| 65 72 20 74 68 65 0a 25 | 20 20 20 20 67 72 6f 75 |er the.%| grou|
|00002d50| 70 2e 20 53 69 6e 63 65 | 20 61 7e 22 5c 64 65 66 |p. Since| a~"\def|
|00002d60| 22 20 69 73 20 67 6f 69 | 6e 67 20 74 6f 20 66 69 |" is goi|ng to fi|
|00002d70| 6e 69 73 68 20 77 68 61 | 74 20 77 65 20 77 61 6e |nish wha|t we wan|
|00002d80| 74 2c 20 77 65 20 63 61 | 6e 0a 25 20 20 20 20 69 |t, we ca|n.% i|
|00002d90| 6e 73 65 72 74 20 74 68 | 65 20 60 60 64 6f 2d 61 |nsert th|e ``do-a|
|00002da0| 66 74 65 72 27 27 20 74 | 6f 6b 65 6e 20 76 69 61 |fter'' t|oken via|
|00002db0| 20 22 5c 61 66 74 65 72 | 61 73 73 69 67 6e 6d 65 | "\after|assignme|
|00002dc0| 6e 74 22 2e 0a 25 20 20 | 20 20 5c 62 65 67 69 6e |nt"..% | \begin|
|00002dd0| 7b 6d 61 63 72 6f 63 6f | 64 65 7d 0a 20 20 20 20 |{macroco|de}. |
|00002de0| 20 5c 61 66 74 65 72 67 | 72 6f 75 70 5c 61 66 74 | \afterg|roup\aft|
|00002df0| 65 72 61 73 73 69 67 6e | 6d 65 6e 74 20 5c 61 66 |erassign|ment \af|
|00002e00| 74 65 72 67 72 6f 75 70 | 23 32 25 0a 20 20 20 20 |tergroup|#2%. |
|00002e10| 20 5c 61 66 74 65 72 67 | 72 6f 75 70 5c 64 65 66 | \afterg|roup\def|
|00002e20| 20 5c 61 66 74 65 72 67 | 72 6f 75 70 23 31 25 0a | \afterg|roup#1%.|
|00002e30| 20 20 20 20 20 20 20 20 | 20 5c 66 75 74 75 72 65 | | \future|
|00002e40| 6c 65 74 5c 6e 65 78 74 | 5c 5e 5e 39 30 7d 0a 25 |let\next|\^^90}.%|
|00002e50| 20 20 20 20 5c 65 6e 64 | 7b 6d 61 63 72 6f 63 6f | \end|{macroco|
|00002e60| 64 65 7d 0a 25 20 5c 65 | 6e 64 7b 6d 61 63 72 6f |de}.% \e|nd{macro|
|00002e70| 7d 0a 25 20 20 20 20 57 | 65 20 73 74 69 6c 6c 20 |}.% W|e still |
|00002e80| 68 61 76 65 20 74 68 65 | 20 74 6f 6b 65 6e 20 69 |have the| token i|
|00002e90| 6e 20 6f 75 72 20 69 6e | 70 75 74 20 73 74 72 65 |n our in|put stre|
|00002ea0| 61 6d 2c 20 62 75 74 20 | 61 6c 73 6f 20 61 20 63 |am, but |also a c|
|00002eb0| 6f 70 79 20 6f 66 0a 25 | 20 20 20 20 69 74 73 20 |opy of.%| its |
|00002ec0| 6d 65 61 6e 69 6e 67 20 | 69 6e 20 22 5c 6e 65 78 |meaning |in "\nex|
|00002ed0| 74 22 2e 20 57 65 20 66 | 69 72 73 74 20 74 72 79 |t". We f|irst try|
|00002ee0| 20 6f 75 74 20 73 6f 6d | 65 20 63 61 73 65 73 20 | out som|e cases |
|00002ef0| 77 68 69 63 68 20 77 69 | 6c 6c 0a 25 20 20 20 20 |which wi|ll.% |
|00002f00| 6e 6f 74 20 61 6c 6c 6f | 77 20 75 73 20 74 6f 20 |not allo|w us to |
|00002f10| 74 72 65 61 74 20 74 68 | 65 20 6e 65 78 74 20 74 |treat th|e next t|
|00002f20| 6f 6b 65 6e 20 61 73 20 | 61 6e 20 75 6e 64 65 6c |oken as |an undel|
|00002f30| 69 6d 69 74 65 64 20 6d | 61 63 72 6f 0a 25 20 20 |imited m|acro.% |
|00002f40| 20 20 70 61 72 61 6d 65 | 74 65 72 2e 20 4f 66 20 | parame|ter. Of |
|00002f50| 63 6f 75 72 73 65 20 77 | 65 20 63 61 6e 6e 6f 74 |course w|e cannot|
|00002f60| 20 64 69 73 74 69 6e 67 | 75 69 73 68 20 65 78 70 | disting|uish exp|
|00002f70| 6c 69 63 69 74 20 66 72 | 6f 6d 20 69 6d 70 6c 69 |licit fr|om impli|
|00002f80| 63 69 74 0a 25 20 20 20 | 20 74 6f 6b 65 6e 73 2c |cit.% | tokens,|
|00002f90| 20 62 75 74 20 77 65 20 | 72 65 6c 79 20 6f 6e 20 | but we |rely on |
|00002fa0| 74 68 65 20 75 73 65 72 | 20 74 6f 20 65 78 70 6c |the user| to expl|
|00002fb0| 69 63 69 74 6c 79 20 75 | 6e 69 6d 70 6c 69 63 61 |icitly u|nimplica|
|00002fc0| 74 65 20 70 6f 73 73 69 | 62 6c 79 0a 25 20 20 20 |te possi|bly.% |
|00002fd0| 20 69 6d 70 6c 69 63 69 | 74 20 63 68 61 72 61 63 | implici|t charac|
|00002fe0| 74 65 72 73 2e 20 57 65 | 20 77 69 6c 6c 20 64 6f |ters. We| will do|
|00002ff0| 20 74 68 69 73 20 6f 75 | 72 73 65 6c 76 65 73 20 | this ou|rselves |
|00003000| 77 69 74 68 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |with the| followi|
|00003010| 6e 67 0a 25 20 20 20 20 | 74 77 6f 20 6f 6e 65 73 |ng.% |two ones|
|00003020| 3a 0a 25 20 20 20 20 5c | 62 65 67 69 6e 7b 6d 61 |:.% \|begin{ma|
|00003030| 63 72 6f 63 6f 64 65 7d | 0a 5c 6c 65 74 5c 62 67 |crocode}|.\let\bg|
|00003040| 72 6f 75 70 5c 72 65 6c | 61 78 20 20 20 5c 6c 65 |roup\rel|ax \le|
|00003050| 74 5c 65 67 72 6f 75 70 | 5c 72 65 6c 61 78 0a 25 |t\egroup|\relax.%|
|00003060| 20 20 20 20 5c 65 6e 64 | 7b 6d 61 63 72 6f 63 6f | \end|{macroco|
|00003070| 64 65 7d 0a 25 20 20 20 | 20 4e 6f 77 20 77 65 20 |de}.% | Now we |
|00003080| 73 74 61 72 74 20 63 68 | 65 63 6b 69 6e 67 20 61 |start ch|ecking a|
|00003090| 6c 6c 20 70 72 6f 62 6c | 65 6d 61 74 69 63 20 63 |ll probl|ematic c|
|000030a0| 61 73 65 73 2e 0a 25 20 | 20 20 20 22 5c 5e 5e 39 |ases..% | "\^^9|
|000030b0| 30 22 20 77 69 6c 6c 20 | 73 75 62 73 74 69 74 75 |0" will |substitu|
|000030c0| 74 65 20 61 6e 20 61 70 | 70 72 6f 70 72 69 61 74 |te an ap|propriat|
|000030d0| 65 20 64 65 66 69 6e 69 | 74 69 6f 6e 20 67 69 76 |e defini|tion giv|
|000030e0| 65 6e 0a 25 20 20 20 20 | 65 78 70 6c 69 63 69 74 |en.% |explicit|
|000030f0| 6c 79 20 69 6e 73 74 65 | 61 64 20 6f 66 20 74 68 |ly inste|ad of th|
|00003100| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 74 6f 6b 65 |e follow|ing toke|
|00003110| 6e 2e 20 49 66 20 77 65 | 20 63 61 6e 2c 20 68 6f |n. If we| can, ho|
|00003120| 77 65 76 65 72 2c 20 77 | 65 0a 25 20 20 20 20 72 |wever, w|e.% r|
|00003130| 61 74 68 65 72 20 75 73 | 65 20 74 68 65 20 74 6f |ather us|e the to|
|00003140| 6b 65 6e 20 77 65 20 67 | 65 74 2e 20 49 66 20 79 |ken we g|et. If y|
|00003150| 6f 75 20 77 6f 6e 64 65 | 72 20 61 62 6f 75 74 20 |ou wonde|r about |
|00003160| 74 68 69 73 20 6e 61 6d | 65 2c 20 68 65 72 65 0a |this nam|e, here.|
|00003170| 25 20 20 20 20 69 73 20 | 77 68 79 3a 20 77 65 20 |% is |why: we |
|00003180| 68 61 76 65 20 74 6f 20 | 75 73 65 20 68 6f 73 74 |have to |use host|
|00003190| 73 20 6f 66 20 6d 61 63 | 72 6f 73 20 62 65 63 61 |s of mac|ros beca|
|000031a0| 75 73 65 20 6f 66 20 76 | 61 72 69 6f 75 73 0a 25 |use of v|arious.%|
|000031b0| 20 20 20 20 22 5c 66 75 | 74 75 72 65 6c 65 74 22 | "\fu|turelet"|
|000031c0| 2d 6c 69 6b 65 20 63 6f | 6e 73 74 72 75 63 74 69 |-like co|nstructi|
|000031d0| 6f 6e 73 2e 20 50 61 74 | 63 68 65 73 20 6f 63 63 |ons. Pat|ches occ|
|000031e0| 75 72 20 6a 75 73 74 20 | 69 6e 20 61 20 6c 6f 63 |ur just |in a loc|
|000031f0| 61 6c 20 67 72 6f 75 70 | 2c 0a 25 20 20 20 20 61 |al group|,.% a|
|00003200| 6e 64 20 73 68 6f 75 6c | 64 20 6e 6f 74 20 70 65 |nd shoul|d not pe|
|00003210| 72 6d 61 6e 65 6e 74 6c | 79 20 72 65 71 75 69 72 |rmanentl|y requir|
|00003220| 65 20 72 65 73 6f 75 72 | 63 65 73 2e 20 49 66 20 |e resour|ces. If |
|00003230| 77 65 20 64 69 64 20 6e | 6f 74 20 75 73 65 0a 25 |we did n|ot use.%|
|00003240| 20 20 20 20 6f 6e 65 2d | 6c 65 74 74 65 72 20 63 | one-|letter c|
|00003250| 6f 6e 74 72 6f 6c 20 73 | 65 71 75 65 6e 63 65 73 |ontrol s|equences|
|00003260| 20 68 65 72 65 2c 20 74 | 68 65 20 68 61 73 68 20 | here, t|he hash |
|00003270| 74 61 62 6c 65 20 73 69 | 7a 65 20 77 6f 75 6c 64 |table si|ze would|
|00003280| 20 62 65 0a 25 20 20 20 | 20 73 6f 6d 65 77 68 61 | be.% | somewha|
|00003290| 74 20 72 65 64 75 63 65 | 64 2c 20 70 65 72 6d 61 |t reduce|d, perma|
|000032a0| 6e 65 6e 74 6c 79 2c 20 | 62 65 63 61 75 73 65 20 |nently, |because |
|000032b0| 65 6e 74 72 69 65 73 20 | 6e 65 76 65 72 20 6c 65 |entries |never le|
|000032c0| 61 76 65 20 74 68 65 0a | 25 20 20 20 20 68 61 73 |ave the.|% has|
|000032d0| 68 20 74 61 62 6c 65 2e | 20 4f 6e 65 20 6c 65 74 |h table.| One let|
|000032e0| 74 65 72 20 63 6f 6e 74 | 72 6f 6c 20 73 65 71 75 |ter cont|rol sequ|
|000032f0| 65 6e 63 65 73 2c 20 68 | 6f 77 65 76 65 72 2c 20 |ences, h|owever, |
|00003300| 61 72 65 20 6e 6f 74 0a | 25 20 20 20 20 68 61 73 |are not.|% has|
|00003310| 68 65 64 2c 20 61 6e 64 | 20 63 61 6e 20 64 69 73 |hed, and| can dis|
|00003320| 61 70 70 65 61 72 20 77 | 69 74 68 6f 75 74 20 61 |appear w|ithout a|
|00003330| 20 74 72 61 63 65 20 61 | 67 61 69 6e 2e 0a 25 20 | trace a|gain..% |
|00003340| 20 20 20 5c 62 65 67 69 | 6e 7b 6d 61 63 72 6f 63 | \begi|n{macroc|
|00003350| 6f 64 65 7d 0a 5c 64 65 | 66 5c 5e 5e 39 30 7b 25 |ode}.\de|f\^^90{%|
|00003360| 0a 20 20 20 20 5c 69 66 | 63 61 74 5c 6e 6f 65 78 |. \if|cat\noex|
|00003370| 70 61 6e 64 5c 6e 65 78 | 74 7b 25 0a 20 20 20 20 |pand\nex|t{%. |
|00003380| 20 20 20 20 20 5c 5e 5e | 39 31 7b 5c 61 66 74 65 | \^^|91{\afte|
|00003390| 72 67 72 6f 75 70 7b 5c | 69 66 66 61 6c 73 65 7d |rgroup{\|iffalse}|
|000033a0| 5c 66 69 7d 25 0a 20 20 | 20 20 5c 65 6c 73 65 5c |\fi}%. | \else\|
|000033b0| 69 66 63 61 74 5c 6e 6f | 65 78 70 61 6e 64 5c 6e |ifcat\no|expand\n|
|000033c0| 65 78 74 7d 25 0a 20 20 | 20 20 20 20 20 20 20 5c |ext}%. | \|
|000033d0| 5e 5e 39 31 7b 5c 69 66 | 66 61 6c 73 65 7b 5c 66 |^^91{\if|false{\f|
|000033e0| 69 5c 61 66 74 65 72 67 | 72 6f 75 70 7d 7d 25 0a |i\afterg|roup}}%.|
|000033f0| 20 20 20 20 5c 65 6c 73 | 65 5c 69 66 63 61 74 5c | \els|e\ifcat\|
|00003400| 6e 6f 65 78 70 61 6e 64 | 5c 6e 65 78 74 5c 73 70 |noexpand|\next\sp|
|00003410| 61 63 65 0a 20 20 20 20 | 20 20 20 20 20 5c 5e 5e |ace. | \^^|
|00003420| 39 31 7b 5c 65 78 70 61 | 6e 64 61 66 74 65 72 5c |91{\expa|ndafter\|
|00003430| 61 66 74 65 72 67 72 6f | 75 70 5c 73 70 61 63 65 |aftergro|up\space|
|00003440| 7d 25 0a 20 20 20 20 5c | 65 6c 73 65 5c 69 66 63 |}%. \|else\ifc|
|00003450| 61 74 5c 6e 6f 65 78 70 | 61 6e 64 5c 6e 65 78 74 |at\noexp|and\next|
|00003460| 23 23 0a 20 20 20 20 20 | 20 20 20 20 5c 5e 5e 39 |##. | \^^9|
|00003470| 31 7b 5c 61 66 74 65 72 | 67 72 6f 75 70 23 23 23 |1{\after|group###|
|00003480| 23 23 23 23 23 7d 25 0a | 20 20 20 20 5c 65 6c 73 |#####}%.| \els|
|00003490| 65 0a 20 20 20 20 20 20 | 20 20 20 5c 6c 65 74 5c |e. | \let\|
|000034a0| 6e 65 78 74 5c 5e 5e 39 | 33 25 0a 20 20 20 20 20 |next\^^9|3%. |
|000034b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 5c 66 69 5c | | \fi\|
|000034c0| 66 69 5c 66 69 5c 66 69 | 5c 6e 65 78 74 7d 0a 25 |fi\fi\fi|\next}.%|
|000034d0| 20 20 20 20 5c 65 6e 64 | 7b 6d 61 63 72 6f 63 6f | \end|{macroco|
|000034e0| 64 65 7d 0a 25 20 20 20 | 20 22 5c 5e 5e 39 31 22 |de}.% | "\^^91"|
|000034f0| 20 69 73 20 72 61 74 68 | 65 72 20 73 69 6d 70 6c | is rath|er simpl|
|00003500| 65 2e 20 57 65 20 73 61 | 76 65 20 74 68 65 20 64 |e. We sa|ve the d|
|00003510| 65 66 69 6e 69 74 69 6f | 6e 20 69 6e 0a 25 20 20 |efinitio|n in.% |
|00003520| 20 20 22 5c 6e 65 78 74 | 40 22 2c 20 61 6e 64 20 | "\next|@", and |
|00003530| 77 65 27 6c 6c 20 63 61 | 6c 6c 20 75 70 6f 6e 20 |we'll ca|ll upon |
|00003540| 74 68 69 73 20 61 66 74 | 65 72 20 64 69 73 70 6f |this aft|er dispo|
|00003550| 73 69 6e 67 20 6f 66 20 | 74 68 65 20 6e 65 78 74 |sing of |the next|
|00003560| 0a 25 20 20 20 20 74 6f | 6b 65 6e 2e 0a 25 20 20 |.% to|ken..% |
|00003570| 20 20 5c 62 65 67 69 6e | 7b 6d 61 63 72 6f 63 6f | \begin|{macroco|
|00003580| 64 65 7d 0a 5c 64 65 66 | 5c 5e 5e 39 31 23 31 7b |de}.\def|\^^91#1{|
|00003590| 5c 64 65 66 5c 6e 65 78 | 74 40 7b 5c 65 6e 64 67 |\def\nex|t@{\endg|
|000035a0| 72 6f 75 70 7b 23 31 7d | 7d 25 0a 20 20 20 20 5c |roup{#1}|}%. \|
|000035b0| 6c 65 74 5c 6e 65 78 74 | 5c 5e 5e 39 32 7d 0a 5c |let\next|\^^92}.\|
|000035c0| 64 65 66 5c 5e 5e 39 32 | 7b 5c 61 66 74 65 72 61 |def\^^92|{\aftera|
|000035d0| 73 73 69 67 6e 6d 65 6e | 74 5c 6e 65 78 74 40 20 |ssignmen|t\next@ |
|000035e0| 5c 6c 65 74 5c 6e 65 78 | 74 3d 20 7d 0a 25 20 20 |\let\nex|t= }.% |
|000035f0| 20 20 5c 65 6e 64 7b 6d | 61 63 72 6f 63 6f 64 65 | \end{m|acrocode|
|00003600| 7d 0a 25 20 20 20 20 22 | 5c 5e 5e 39 33 22 20 77 |}.% "|\^^93" w|
|00003610| 69 6c 6c 20 61 63 74 69 | 76 65 6c 79 20 67 65 74 |ill acti|vely get|
|00003620| 20 74 68 65 20 6e 65 78 | 74 20 74 6f 6b 65 6e 2c | the nex|t token,|
|00003630| 20 61 6e 64 20 70 72 6f | 64 75 63 65 20 61 6e 0a | and pro|duce an.|
|00003640| 25 20 20 20 20 22 5c 61 | 66 74 65 72 67 72 6f 75 |% "\a|ftergrou|
|00003650| 70 22 20 64 65 66 69 6e | 69 74 69 6f 6e 20 66 72 |p" defin|ition fr|
|00003660| 6f 6d 20 74 68 61 74 2e | 20 49 74 20 69 73 20 22 |om that.| It is "|
|00003670| 5c 6c 6f 6e 67 22 20 69 | 6e 20 63 61 73 65 20 77 |\long" i|n case w|
|00003680| 65 20 61 72 65 0a 25 20 | 20 20 20 64 65 61 6c 69 |e are.% | deali|
|00003690| 6e 67 20 77 69 74 68 20 | 61 20 22 5c 70 61 72 22 |ng with |a "\par"|
|000036a0| 20 74 6f 6b 65 6e 2e 0a | 25 20 20 20 20 5c 62 65 | token..|% \be|
|000036b0| 67 69 6e 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 0a 5c |gin{macr|ocode}.\|
|000036c0| 6c 6f 6e 67 5c 64 65 66 | 5c 5e 5e 39 33 23 31 7b |long\def|\^^93#1{|
|000036d0| 5c 65 6e 64 67 72 6f 75 | 70 7b 5c 61 66 74 65 72 |\endgrou|p{\after|
|000036e0| 67 72 6f 75 70 23 31 7d | 7d 0a 25 20 20 20 20 5c |group#1}|}.% \|
|000036f0| 65 6e 64 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 0a 25 |end{macr|ocode}.%|
|00003700| 20 5c 62 65 67 69 6e 7b | 6d 61 63 72 6f 7d 7b 5c | \begin{|macro}{\|
|00003710| 40 6e 64 70 40 74 63 68 | 7d 0a 25 20 20 20 20 54 |@ndp@tch|}.% T|
|00003720| 68 69 73 20 69 73 20 73 | 75 70 70 6f 73 65 64 20 |his is s|upposed |
|00003730| 74 6f 20 62 65 20 75 73 | 65 64 20 61 73 20 61 20 |to be us|ed as a |
|00003740| 64 65 6c 69 6d 69 74 65 | 72 2e 20 53 6f 20 74 68 |delimite|r. So th|
|00003750| 61 74 20 77 65 20 6d 61 | 79 0a 25 20 20 20 20 63 |at we ma|y.% c|
|00003760| 68 65 63 6b 20 66 6f 72 | 20 69 74 73 20 61 70 70 |heck for| its app|
|00003770| 65 61 72 61 6e 63 65 20 | 63 6f 6e 76 65 6e 69 65 |earance |convenie|
|00003780| 6e 74 6c 79 2c 20 77 65 | 20 64 65 66 69 6e 65 20 |ntly, we| define |
|00003790| 69 74 20 61 73 20 69 74 | 73 20 6f 77 6e 0a 25 20 |it as it|s own.% |
|000037a0| 20 20 20 22 5c 66 75 74 | 75 72 65 64 65 66 22 20 | "\fut|uredef" |
|000037b0| 65 78 70 61 6e 73 69 6f | 6e 2e 0a 25 20 20 20 20 |expansio|n..% |
|000037c0| 5c 62 65 67 69 6e 7b 6d | 61 63 72 6f 63 6f 64 65 |\begin{m|acrocode|
|000037d0| 7d 0a 5c 64 65 66 5c 40 | 6e 64 70 40 74 63 68 7b |}.\def\@|ndp@tch{|
|000037e0| 5c 61 66 74 65 72 67 72 | 6f 75 70 5c 40 6e 64 70 |\aftergr|oup\@ndp|
|000037f0| 40 74 63 68 7d 0a 25 20 | 20 20 20 5c 65 6e 64 7b |@tch}.% | \end{|
|00003800| 6d 61 63 72 6f 63 6f 64 | 65 7d 0a 25 20 5c 65 6e |macrocod|e}.% \en|
|00003810| 64 7b 6d 61 63 72 6f 7d | 0a 25 20 5c 62 65 67 69 |d{macro}|.% \begi|
|00003820| 6e 7b 6d 61 63 72 6f 7d | 7b 5c 67 70 61 74 63 68 |n{macro}|{\gpatch|
|00003830| 7d 0a 25 20 20 20 20 20 | 54 68 69 73 20 69 73 20 |}.% |This is |
|00003840| 69 74 2e 20 49 66 20 79 | 6f 75 20 61 72 65 20 69 |it. If y|ou are i|
|00003850| 6e 20 64 6f 75 62 74 20 | 61 73 20 74 6f 20 77 68 |n doubt |as to wh|
|00003860| 61 74 20 74 68 65 20 22 | 5c 64 65 66 5c 6e 65 78 |at the "|\def\nex|
|00003870| 74 7b 7d 22 20 69 73 0a | 25 20 20 20 20 20 73 75 |t{}" is.|% su|
|00003880| 70 70 6f 73 65 64 20 74 | 6f 7e 61 63 68 69 65 76 |pposed t|o~achiev|
|00003890| 65 2c 20 74 68 69 73 20 | 69 73 7e 65 61 73 79 2e |e, this |is~easy.|
|000038a0| 20 57 65 20 77 61 6e 74 | 20 74 6f 20 64 65 74 65 | We want| to dete|
|000038b0| 63 74 20 77 68 65 74 68 | 65 72 20 79 6f 75 0a 25 |ct wheth|er you.%|
|000038c0| 20 20 20 20 20 77 61 6e | 74 20 61 7e 6c 6f 6e 67 | wan|t a~long|
|000038d0| 20 6d 61 63 72 6f 20 74 | 6f 20 62 65 7e 70 61 74 | macro t|o be~pat|
|000038e0| 63 68 65 64 2e 20 49 6e | 20 74 68 61 74 20 63 61 |ched. In| that ca|
|000038f0| 73 65 2c 20 79 6f 75 20 | 73 61 79 0a 25 20 20 20 |se, you |say.% |
|00003900| 20 20 22 5c 6c 6f 6e 67 | 5c 67 70 61 74 63 68 22 | "\long|\gpatch"|
|00003910| 5c 64 6f 74 73 2e 20 57 | 65 20 63 61 6e 20 66 69 |\dots. W|e can fi|
|00003920| 67 75 72 65 20 74 68 69 | 73 20 6f 75 74 20 62 79 |gure thi|s out by|
|00003930| 20 63 6f 6d 70 61 72 69 | 6e 67 0a 25 20 20 20 20 | compari|ng.% |
|00003940| 20 22 5c 6e 65 78 74 22 | 20 74 6f 20 74 68 65 20 | "\next"| to the |
|00003950| 6e 6f 6e 2d 6c 6f 6e 67 | 7e 22 5c 65 6d 70 74 79 |non-long|~"\empty|
|00003960| 22 2e 20 4f 66 20 63 6f | 75 72 73 65 2c 20 77 65 |". Of co|urse, we|
|00003970| 20 64 6f 20 6e 6f 74 0a | 25 20 20 20 20 20 65 78 | do not.|% ex|
|00003980| 70 6c 69 63 69 74 6c 79 | 20 63 68 65 63 6b 20 66 |plicitly| check f|
|00003990| 6f 72 20 22 5c 6f 75 74 | 65 72 22 6e 65 73 73 2e |or "\out|er"ness.|
|000039a0| 20 59 6f 75 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 | You sho|uld not |
|000039b0| 65 76 65 6e 20 74 68 69 | 6e 6b 20 6f 66 0a 25 20 |even thi|nk of.% |
|000039c0| 20 20 20 20 77 61 6e 74 | 69 6e 67 20 74 6f 20 6d | want|ing to m|
|000039d0| 61 6b 65 20 61 6e 20 22 | 5c 6f 75 74 65 72 22 20 |ake an "|\outer" |
|000039e0| 64 65 66 69 6e 69 74 69 | 6f 6e 2e 0a 25 0a 25 20 |definiti|on..%.% |
|000039f0| 20 20 20 57 65 20 73 74 | 61 72 74 20 62 79 20 64 | We st|art by d|
|00003a00| 65 66 69 6e 69 6e 67 7e | 22 5c 67 70 61 74 63 68 |efining~|"\gpatch|
|00003a10| 22 2c 20 77 68 69 63 68 | 20 77 69 6c 6c 20 69 6e |", which| will in|
|00003a20| 20 74 68 65 20 63 61 73 | 65 0a 25 20 20 20 20 6f | the cas|e.% o|
|00003a30| 66 7e 64 69 73 61 62 6c | 65 64 20 22 67 6c 6f 62 |f~disabl|ed "glob|
|00003a40| 61 6c 22 6e 65 73 73 20 | 72 65 76 65 72 74 20 74 |al"ness |revert t|
|00003a50| 6f 7e 22 5c 70 61 74 63 | 68 22 2e 20 42 6f 74 68 |o~"\patc|h". Both|
|00003a60| 7e 22 5c 70 61 74 63 68 | 22 0a 25 20 20 20 20 61 |~"\patch|".% a|
|00003a70| 6e 64 7e 22 5c 67 70 61 | 74 63 68 22 20 64 65 66 |nd~"\gpa|tch" def|
|00003a80| 69 6e 65 20 22 5c 6e 65 | 78 74 22 20 61 73 20 61 |ine "\ne|xt" as a|
|00003a90| 7e 6d 61 63 72 6f 20 67 | 65 74 74 69 6e 67 20 6f |~macro g|etting o|
|00003aa0| 6e 65 0a 25 20 20 20 20 | 22 5c 40 6e 64 70 40 74 |ne.% |"\@ndp@t|
|00003ab0| 63 68 22 2d 64 65 6c 69 | 6d 69 74 65 64 20 61 72 |ch"-deli|mited ar|
|00003ac0| 67 75 6d 65 6e 74 3a 0a | 25 20 20 20 20 69 74 20 |gument:.|% it |
|00003ad0| 69 73 20 61 6c 6c 20 77 | 68 61 74 20 73 68 6f 75 |is all w|hat shou|
|00003ae0| 6c 64 20 61 70 70 65 61 | 72 20 61 66 74 65 72 20 |ld appea|r after |
|00003af0| 61 7e 22 5c 64 65 66 22 | 2e 0a 25 20 20 20 20 22 |a~"\def"|..% "|
|00003b00| 5c 6e 65 78 74 22 7e 73 | 68 6f 75 6c 64 20 6d 61 |\next"~s|hould ma|
|00003b10| 6b 65 20 61 6c 6c 20 6e | 65 63 65 73 73 61 72 79 |ke all n|ecessary|
|00003b20| 20 61 63 74 69 6f 6e 73 | 20 66 6f 72 20 64 6f 69 | actions| for doi|
|00003b30| 6e 67 0a 25 20 20 20 20 | 74 68 65 7e 64 65 66 69 |ng.% |the~defi|
|00003b40| 6e 69 74 69 6f 6e 2e 20 | 41 66 74 65 72 20 73 65 |nition. |After se|
|00003b50| 74 74 69 6e 67 7e 75 70 | 20 22 5c 6e 65 78 74 22 |tting~up| "\next"|
|00003b60| 2c 20 22 5c 5e 5e 61 30 | 22 7e 69 73 20 63 61 6c |, "\^^a0|"~is cal|
|00003b70| 6c 65 64 2c 20 66 6f 72 | 0a 25 20 20 20 20 77 68 |led, for|.% wh|
|00003b80| 69 63 68 20 77 65 20 77 | 72 61 70 20 75 70 20 74 |ich we w|rap up t|
|00003b90| 68 65 20 61 72 67 75 6d | 65 6e 74 20 6c 69 73 74 |he argum|ent list|
|00003ba0| 20 61 73 20 61 7e 73 65 | 70 61 72 61 74 65 20 61 | as a~se|parate a|
|00003bb0| 72 67 75 6d 65 6e 74 2e | 0a 25 20 20 20 20 5c 62 |rgument.|.% \b|
|00003bc0| 65 67 69 6e 7b 6d 61 63 | 72 6f 63 6f 64 65 7d 0a |egin{mac|rocode}.|
|00003bd0| 5c 64 65 66 5c 67 70 61 | 74 63 68 7b 5c 69 66 6e |\def\gpa|tch{\ifn|
|00003be0| 75 6d 5c 67 6c 6f 62 61 | 6c 64 65 66 73 3c 5c 7a |um\globa|ldefs<\z|
|00003bf0| 40 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |@. | |
|00003c00| 20 20 5c 65 78 70 61 6e | 64 61 66 74 65 72 5c 70 | \expan|dafter\p|
|00003c10| 61 74 63 68 0a 20 20 20 | 20 20 20 20 20 20 20 20 |atch. | |
|00003c20| 20 5c 65 6c 73 65 0a 20 | 20 20 20 20 20 20 20 20 | \else. | |
|00003c30| 20 20 20 20 20 20 20 5c | 65 78 70 61 6e 64 61 66 | \|expandaf|
|00003c40| 74 65 72 5c 5e 5e 39 38 | 25 0a 20 20 20 20 20 20 |ter\^^98|%. |
|00003c50| 20 20 20 20 20 20 5c 66 | 69 7d 0a 5c 6c 6f 6e 67 | \f|i}.\long|
|00003c60| 5c 64 65 66 5c 5e 5e 39 | 38 23 31 23 32 23 7b 5c |\def\^^9|8#1#2#{\|
|00003c70| 64 65 66 5c 6e 65 78 74 | 7b 7d 25 0a 20 20 20 20 |def\next|{}%. |
|00003c80| 20 20 20 20 20 20 20 20 | 20 20 20 5c 6c 6f 6e 67 | | \long|
|00003c90| 5c 65 64 65 66 5c 6e 65 | 78 74 23 23 31 5c 40 6e |\edef\ne|xt##1\@n|
|00003ca0| 64 70 40 74 63 68 25 0a | 20 20 20 20 20 20 20 20 |dp@tch%.| |
|00003cb0| 20 20 20 20 20 20 20 20 | 20 20 7b 5c 69 66 78 5c | | {\ifx\|
|00003cc0| 6e 65 78 74 5c 65 6d 70 | 74 79 5c 65 6c 73 65 5c |next\emp|ty\else\|
|00003cd0| 6c 6f 6e 67 5c 66 69 5c | 67 64 65 66 23 23 31 7d |long\fi\|gdef##1}|
|00003ce0| 25 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |%. | |
|00003cf0| 20 5c 5e 5e 61 30 23 31 | 7b 23 32 7d 7d 0a 25 20 | \^^a0#1|{#2}}.% |
|00003d00| 20 20 20 5c 65 6e 64 7b | 6d 61 63 72 6f 63 6f 64 | \end{|macrocod|
|00003d10| 65 7d 0a 25 20 5c 65 6e | 64 7b 6d 61 63 72 6f 7d |e}.% \en|d{macro}|
|00003d20| 0a 25 20 5c 62 65 67 69 | 6e 7b 6d 61 63 72 6f 7d |.% \begi|n{macro}|
|00003d30| 7b 5c 70 61 74 63 68 7d | 0a 25 20 20 20 20 22 5c |{\patch}|.% "\|
|00003d40| 70 61 74 63 68 22 7e 69 | 73 20 61 7e 62 69 74 20 |patch"~i|s a~bit |
|00003d50| 6d 6f 72 65 20 63 6f 6d | 70 6c 69 63 61 74 65 64 |more com|plicated|
|00003d60| 2c 20 62 65 63 61 75 73 | 65 20 77 65 20 6e 65 65 |, becaus|e we nee|
|00003d70| 64 20 74 6f 7e 6d 61 6b | 65 0a 25 20 20 20 20 61 |d to~mak|e.% a|
|00003d80| 64 64 69 74 69 6f 6e 73 | 20 74 6f 20 74 68 65 20 |dditions| to the |
|00003d90| 63 75 72 72 65 6e 74 20 | 22 5c 74 6f 6b 73 40 22 |current |"\toks@"|
|00003da0| 7e 6c 69 73 74 2e 0a 25 | 20 20 20 20 5c 62 65 67 |~list..%| \beg|
|00003db0| 69 6e 7b 6d 61 63 72 6f | 63 6f 64 65 7d 0a 5c 64 |in{macro|code}.\d|
|00003dc0| 65 66 5c 70 61 74 63 68 | 23 31 23 32 23 7b 5c 64 |ef\patch|#1#2#{\d|
|00003dd0| 65 66 5c 6e 65 78 74 7b | 7d 25 0a 20 20 5c 6c 6f |ef\next{|}%. \lo|
|00003de0| 6e 67 5c 65 64 65 66 5c | 6e 65 78 74 23 23 31 5c |ng\edef\|next##1\|
|00003df0| 40 6e 64 70 40 74 63 68 | 0a 20 20 20 20 20 7b 5c |@ndp@tch|. {\|
|00003e00| 74 6f 6b 73 40 20 5c 6e | 6f 65 78 70 61 6e 64 5c |toks@ \n|oexpand\|
|00003e10| 65 78 70 61 6e 64 61 66 | 74 65 72 20 7b 5c 6e 6f |expandaf|ter {\no|
|00003e20| 65 78 70 61 6e 64 5c 74 | 68 65 20 5c 74 6f 6b 73 |expand\t|he \toks|
|00003e30| 40 0a 20 20 20 20 20 20 | 20 20 20 20 5c 69 66 78 |@. | \ifx|
|00003e40| 5c 6e 65 78 74 5c 65 6d | 70 74 79 5c 65 6c 73 65 |\next\em|pty\else|
|00003e50| 5c 6c 6f 6e 67 5c 66 69 | 20 5c 64 65 66 23 23 31 |\long\fi| \def##1|
|00003e60| 7d 7d 25 0a 20 20 5c 5e | 5e 61 30 23 31 7b 23 32 |}}%. \^|^a0#1{#2|
|00003e70| 7d 7d 0a 25 20 20 20 20 | 5c 65 6e 64 7b 6d 61 63 |}}.% |\end{mac|
|00003e80| 72 6f 63 6f 64 65 7d 0a | 25 20 5c 65 6e 64 7b 6d |rocode}.|% \end{m|
|00003e90| 61 63 72 6f 7d 0a 25 0a | 25 20 20 20 20 4e 6f 77 |acro}.%.|% Now|
|00003ea0| 20 74 68 65 20 72 65 61 | 6c 20 66 75 6e 20 73 74 | the rea|l fun st|
|00003eb0| 61 72 74 73 2e 20 57 65 | 20 67 65 74 20 74 68 65 |arts. We| get the|
|00003ec0| 20 61 72 67 75 6d 65 6e | 74 20 72 65 70 6c 61 63 | argumen|t replac|
|00003ed0| 65 6d 65 6e 74 20 6c 69 | 73 74 2c 0a 25 20 20 20 |ement li|st,.% |
|00003ee0| 20 61 6e 64 20 74 68 65 | 20 6d 61 63 72 6f 20 62 | and the| macro b|
|00003ef0| 6f 64 79 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ody repl|acement |
|00003f00| 6c 69 73 74 2e 20 57 65 | 20 64 65 66 69 6e 65 20 |list. We| define |
|00003f10| 61 7e 6d 61 63 72 6f 7e | 22 5c 5e 5e 65 30 22 0a |a~macro~|"\^^e0".|
|00003f20| 25 20 20 20 20 28 74 68 | 65 20 22 65 22 20 6d 65 |% (th|e "e" me|
|00003f30| 61 6e 73 20 65 72 72 6f | 72 29 20 6a 75 73 74 20 |ans erro|r) just |
|00003f40| 66 6f 72 20 6b 6e 6f 77 | 69 6e 67 20 74 68 65 20 |for know|ing the |
|00003f50| 70 72 6f 70 65 72 20 6d | 61 63 72 6f 20 6e 61 6d |proper m|acro nam|
|00003f60| 65 20 66 6f 72 0a 25 20 | 20 20 20 65 72 72 6f 72 |e for.% | error|
|00003f70| 20 6d 65 73 73 61 67 65 | 73 2e 0a 25 0a 25 20 20 | message|s..%.% |
|00003f80| 20 20 57 65 20 70 72 65 | 70 61 72 65 20 69 6e 20 | We pre|pare in |
|00003f90| 61 20 6c 6f 63 61 6c 0a | 25 20 20 20 20 22 5c 74 |a local.|% "\t|
|00003fa0| 6f 6b 73 40 22 20 74 68 | 65 20 64 65 66 69 6e 69 |oks@" th|e defini|
|00003fb0| 74 69 6f 6e 20 28 62 65 | 63 61 75 73 65 20 77 65 |tion (be|cause we|
|00003fc0| 20 63 6f 75 6c 64 20 6e | 6f 74 20 73 69 6d 70 6c | could n|ot simpl|
|00003fd0| 79 0a 25 20 20 20 20 22 | 5c 61 66 74 65 72 67 72 |y.% "|\aftergr|
|00003fe0| 6f 75 70 22 20 74 68 65 | 20 61 72 67 75 6d 65 6e |oup" the| argumen|
|00003ff0| 74 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 2c 20 77 |t replac|ement, w|
|00004000| 68 69 63 68 20 63 6f 75 | 6c 64 20 63 6f 6e 73 69 |hich cou|ld consi|
|00004010| 73 74 20 6f 66 0a 25 20 | 20 20 20 61 6e 79 20 6e |st of.% | any n|
|00004020| 75 6d 62 65 72 20 6f 66 | 7e 74 6f 6b 65 6e 73 29 |umber of|~tokens)|
|00004030| 2e 20 4e 6f 74 65 20 74 | 68 61 74 20 77 65 20 73 |. Note t|hat we s|
|00004040| 74 61 72 74 20 79 65 74 | 20 61 6e 6f 74 68 65 72 |tart yet| another|
|00004050| 20 67 72 6f 75 70 2c 0a | 25 20 20 20 20 6d 61 6b | group,.|% mak|
|00004060| 69 6e 67 20 74 68 65 20 | 64 65 66 69 6e 69 74 69 |ing the |definiti|
|00004070| 6f 6e 73 20 6f 66 20 22 | 5c 74 6f 6b 73 40 22 20 |ons of "|\toks@" |
|00004080| 61 6e 64 20 22 5c 6e 65 | 78 74 22 20 73 74 61 62 |and "\ne|xt" stab|
|00004090| 6c 65 2e 0a 25 0a 25 20 | 20 20 20 5c 62 65 67 69 |le..%.% | \begi|
|000040a0| 6e 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 5c 6c 6f |n{macroc|ode}.\lo|
|000040b0| 6e 67 5c 64 65 66 5c 5e | 5e 61 30 23 31 23 32 23 |ng\def\^|^a0#1#2#|
|000040c0| 33 23 34 7b 5c 62 65 67 | 69 6e 67 72 6f 75 70 0a |3#4{\beg|ingroup.|
|000040d0| 20 20 20 20 5c 64 65 66 | 5c 5e 5e 65 30 7b 23 31 | \def|\^^e0{#1|
|000040e0| 7d 25 0a 20 20 20 20 5c | 74 6f 6b 73 40 7b 5c 65 |}%. \|toks@{\e|
|000040f0| 6e 64 67 72 6f 75 70 5c | 6e 65 78 74 23 31 23 32 |ndgroup\|next#1#2|
|00004100| 7d 25 0a 20 20 20 20 5c | 62 65 67 69 6e 67 72 6f |}%. \|begingro|
|00004110| 75 70 0a 20 20 20 20 5c | 61 66 74 65 72 67 72 6f |up. \|aftergro|
|00004120| 75 70 5c 74 68 65 5c 61 | 66 74 65 72 67 72 6f 75 |up\the\a|ftergrou|
|00004130| 70 5c 74 6f 6b 73 40 0a | 25 20 20 20 20 5c 65 6e |p\toks@.|% \en|
|00004140| 64 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 25 20 20 |d{macroc|ode}.% |
|00004150| 20 20 57 65 20 63 6f 6c | 6c 65 63 74 20 74 68 65 | We col|lect the|
|00004160| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 69 6e 20 | replace|ment in |
|00004170| 61 20 63 6f 6e 74 69 6e | 75 61 6c 6c 79 20 73 68 |a contin|ually sh|
|00004180| 72 69 6e 6b 69 6e 67 20 | 74 6f 6b 65 6e 20 6c 69 |rinking |token li|
|00004190| 73 74 2e 0a 25 20 20 20 | 20 44 6f 20 6e 6f 74 20 |st..% | Do not |
|000041a0| 67 65 74 20 61 6e 6e 6f | 79 65 64 2c 20 62 75 74 |get anno|yed, but|
|000041b0| 20 77 65 27 6c 6c 20 75 | 73 65 20 22 5c 74 6f 6b | we'll u|se "\tok|
|000041c0| 73 40 22 20 66 6f 72 20 | 74 68 61 74 2c 20 74 6f |s@" for |that, to|
|000041d0| 6f 2e 0a 25 20 20 20 20 | 57 68 65 6e 20 77 65 20 |o..% |When we |
|000041e0| 61 72 65 20 74 68 72 6f | 75 67 68 20 77 69 74 68 |are thro|ugh with|
|000041f0| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 73 2c 20 77 | replace|ments, w|
|00004200| 65 27 6c 6c 20 73 61 79 | 20 22 5c 65 6e 64 67 72 |e'll say| "\endgr|
|00004210| 6f 75 70 22 2c 0a 25 20 | 20 20 20 61 66 74 65 72 |oup",.% | after|
|00004220| 20 77 68 69 63 68 20 74 | 68 65 20 64 65 66 69 6e | which t|he defin|
|00004230| 69 74 69 6f 6e 20 74 61 | 6b 65 73 20 70 6c 61 63 |ition ta|kes plac|
|00004240| 65 2e 0a 25 0a 25 20 20 | 20 20 54 68 65 20 72 65 |e..%.% | The re|
|00004250| 70 6c 61 63 65 6d 65 6e | 74 20 6e 65 65 64 73 0a |placemen|t needs.|
|00004260| 25 20 20 20 20 74 6f 20 | 62 65 20 69 6e 20 61 20 |% to |be in a |
|00004270| 74 6f 6b 65 6e 20 6c 69 | 73 74 20 69 6e 73 74 65 |token li|st inste|
|00004280| 61 64 20 6f 66 20 61 20 | 6d 61 63 72 6f 20 69 6e |ad of a |macro in|
|00004290| 20 6f 72 64 65 72 20 6e | 6f 74 20 74 6f 20 62 72 | order n|ot to br|
|000042a0| 65 61 6b 20 75 70 6f 6e | 0a 25 20 20 20 20 65 6e |eak upon|.% en|
|000042b0| 63 6f 75 6e 74 65 72 69 | 6e 67 20 68 61 73 68 20 |counteri|ng hash |
|000042c0| 6d 61 72 6b 73 2e 20 54 | 68 65 20 75 73 65 20 6f |marks. T|he use o|
|000042d0| 66 20 22 5c 74 6f 6b 73 | 40 22 20 66 6f 72 20 74 |f "\toks|@" for t|
|000042e0| 68 69 73 20 64 6f 65 73 | 20 6e 6f 74 0a 25 20 20 |his does| not.% |
|000042f0| 20 20 63 6f 6e 66 6c 69 | 63 74 20 77 69 74 68 20 | confli|ct with |
|00004300| 69 74 73 20 6f 74 68 65 | 72 20 75 73 65 73 20 64 |its othe|r uses d|
|00004310| 75 65 20 74 6f 20 74 68 | 65 20 67 72 6f 75 70 69 |ue to th|e groupi|
|00004320| 6e 67 2e 0a 25 0a 25 20 | 20 20 20 41 66 74 65 72 |ng..%.% | After|
|00004330| 20 74 68 61 74 2c 20 77 | 65 20 61 72 65 20 72 65 | that, w|e are re|
|00004340| 61 64 79 20 74 6f 20 73 | 74 61 72 74 20 74 68 65 |ady to s|tart the|
|00004350| 20 66 75 6e 20 62 79 20 | 65 78 70 61 6e 64 69 6e | fun by |expandin|
|00004360| 67 20 6f 75 72 20 6d 61 | 63 72 6f 2c 0a 25 20 20 |g our ma|cro,.% |
|00004370| 20 20 61 6e 64 20 70 75 | 74 74 69 6e 67 7e 22 5c | and pu|tting~"\|
|00004380| 70 40 63 68 65 63 6b 22 | 20 74 6f 7e 77 6f 72 6b |p@check"| to~work|
|00004390| 2e 0a 25 20 20 20 20 5c | 62 65 67 69 6e 7b 6d 61 |..% \|begin{ma|
|000043a0| 63 72 6f 63 6f 64 65 7d | 0a 20 20 20 20 5c 74 6f |crocode}|. \to|
|000043b0| 6b 73 40 7b 23 34 7d 25 | 0a 20 20 20 20 5c 65 78 |ks@{#4}%|. \ex|
|000043c0| 70 61 6e 64 61 66 74 65 | 72 5c 70 40 63 68 65 63 |pandafte|r\p@chec|
|000043d0| 6b 5c 65 78 70 61 6e 64 | 61 66 74 65 72 7b 23 31 |k\expand|after{#1|
|000043e0| 23 33 7d 5c 40 6e 64 70 | 40 74 63 68 7d 0a 25 20 |#3}\@ndp|@tch}.% |
|000043f0| 20 20 20 5c 65 6e 64 7b | 6d 61 63 72 6f 63 6f 64 | \end{|macrocod|
|00004400| 65 7d 0a 25 20 5c 62 65 | 67 69 6e 7b 6d 61 63 72 |e}.% \be|gin{macr|
|00004410| 6f 7d 7b 5c 70 40 6d 61 | 74 63 68 7d 0a 25 20 5c |o}{\p@ma|tch}.% \|
|00004420| 62 65 67 69 6e 7b 6d 61 | 63 72 6f 7d 7b 5c 70 40 |begin{ma|cro}{\p@|
|00004430| 72 65 70 6c 61 63 65 7d | 0a 25 20 20 20 20 54 68 |replace}|.% Th|
|00004440| 65 73 65 20 61 72 65 20 | 74 6f 6b 65 6e 20 6c 69 |ese are |token li|
|00004450| 73 74 73 20 68 6f 6c 64 | 69 6e 67 20 74 68 65 20 |sts hold|ing the |
|00004460| 63 75 72 72 65 6e 74 20 | 73 74 72 69 6e 67 20 74 |current |string t|
|00004470| 6f 20 62 65 20 6d 61 74 | 63 68 65 64 0a 25 20 20 |o be mat|ched.% |
|00004480| 20 20 6e 65 78 74 2c 20 | 61 6e 64 20 69 74 73 20 | next, |and its |
|00004490| 72 65 70 6c 61 63 65 6d | 65 6e 74 20 73 74 72 69 |replacem|ent stri|
|000044a0| 6e 67 2e 20 57 65 0a 25 | 20 20 20 20 75 73 65 20 |ng. We.%| use |
|000044b0| 74 6f 6b 65 6e 20 6c 69 | 73 74 73 7e 31 20 61 6e |token li|sts~1 an|
|000044c0| 64 7e 32 20 66 6f 72 20 | 74 68 61 74 2e 0a 25 20 |d~2 for |that..% |
|000044d0| 20 20 20 5c 62 65 67 69 | 6e 7b 6d 61 63 72 6f 63 | \begi|n{macroc|
|000044e0| 6f 64 65 7d 0a 5c 74 6f | 6b 73 64 65 66 5c 70 40 |ode}.\to|ksdef\p@|
|000044f0| 6d 61 74 63 68 3d 5c 40 | 6e 65 0a 5c 74 6f 6b 73 |match=\@|ne.\toks|
|00004500| 64 65 66 5c 70 40 72 65 | 70 6c 61 63 65 3d 5c 74 |def\p@re|place=\t|
|00004510| 77 40 0a 25 20 20 20 20 | 5c 65 6e 64 7b 6d 61 63 |w@.% |\end{mac|
|00004520| 72 6f 63 6f 64 65 7d 0a | 25 20 5c 65 6e 64 7b 6d |rocode}.|% \end{m|
|00004530| 61 63 72 6f 7d 0a 25 20 | 5c 65 6e 64 7b 6d 61 63 |acro}.% |\end{mac|
|00004540| 72 6f 7d 0a 25 20 5c 62 | 65 67 69 6e 7b 6d 61 63 |ro}.% \b|egin{mac|
|00004550| 72 6f 7d 7b 5c 70 40 63 | 68 65 63 6b 7d 0a 25 20 |ro}{\p@c|heck}.% |
|00004560| 20 20 20 57 65 20 63 68 | 65 63 6b 20 66 6f 72 20 | We ch|eck for |
|00004570| 61 6e 79 20 72 65 6d 61 | 69 6e 69 6e 67 20 72 65 |any rema|ining re|
|00004580| 70 6c 61 63 65 6d 65 6e | 74 73 2e 20 49 66 20 74 |placemen|ts. If t|
|00004590| 68 65 72 65 20 61 72 65 | 20 6e 6f 6e 65 2c 20 77 |here are| none, w|
|000045a0| 65 0a 25 20 20 20 20 6d | 61 79 20 71 75 69 74 2e |e.% m|ay quit.|
|000045b0| 20 22 5c 74 6f 6b 73 40 | 22 7e 69 73 20 74 68 65 | "\toks@|"~is the|
|000045c0| 20 6c 69 73 74 20 6f 66 | 0a 25 20 20 20 20 72 65 | list of|.% re|
|000045d0| 6d 61 69 6e 69 6e 67 20 | 73 75 62 73 74 69 74 75 |maining |substitu|
|000045e0| 74 69 6f 6e 73 2e 20 22 | 5c 65 6e 64 67 72 6f 75 |tions. "|\endgrou|
|000045f0| 70 22 7e 73 74 6f 70 73 | 20 61 6e 64 20 6d 61 6b |p"~stops| and mak|
|00004600| 65 73 20 74 68 65 0a 25 | 20 20 20 20 64 65 66 69 |es the.%| defi|
|00004610| 6e 69 74 69 6f 6e 20 28 | 63 68 65 63 6b 7e 22 5c |nition (|check~"\|
|00004620| 5e 5e 61 30 22 20 74 6f | 7e 73 65 65 7e 77 68 79 |^^a0" to|~see~why|
|00004630| 29 2c 20 22 5c 5e 5e 61 | 31 22 7e 63 6f 6e 74 69 |), "\^^a|1"~conti|
|00004640| 6e 75 65 73 2e 20 42 79 | 20 74 68 65 0a 25 20 20 |nues. By| the.% |
|00004650| 20 20 77 61 79 2c 20 69 | 6e 20 63 61 73 65 20 6f | way, i|n case o|
|00004660| 66 20 61 6e 7e 65 72 72 | 6f 72 2c 20 77 65 20 77 |f an~err|or, we w|
|00004670| 69 6c 6c 20 6c 61 74 65 | 72 20 75 73 65 7e 22 5c |ill late|r use~"\|
|00004680| 6e 65 78 74 40 22 20 69 | 6e 20 6f 72 64 65 72 20 |next@" i|n order |
|00004690| 74 6f 0a 25 20 20 20 20 | 74 65 6c 6c 20 77 68 61 |to.% |tell wha|
|000046a0| 74 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 73 20 77 |t replac|ements w|
|000046b0| 65 72 65 20 6e 6f 74 20 | 63 61 72 72 69 65 64 20 |ere not |carried |
|000046c0| 6f 75 74 2e 0a 25 20 20 | 20 20 5c 62 65 67 69 6e |out..% | \begin|
|000046d0| 7b 6d 61 63 72 6f 63 6f | 64 65 7d 0a 5c 64 65 66 |{macroco|de}.\def|
|000046e0| 5c 70 40 63 68 65 63 6b | 7b 5c 65 64 65 66 5c 6e |\p@check|{\edef\n|
|000046f0| 65 78 74 40 7b 5c 74 68 | 65 5c 74 6f 6b 73 40 7d |ext@{\th|e\toks@}|
|00004700| 25 0a 20 20 20 20 20 20 | 20 20 5c 69 66 78 5c 65 |%. | \ifx\e|
|00004710| 6d 70 74 79 5c 6e 65 78 | 74 40 20 20 5c 65 78 70 |mpty\nex|t@ \exp|
|00004720| 61 6e 64 61 66 74 65 72 | 5c 65 6e 64 67 72 6f 75 |andafter|\endgrou|
|00004730| 70 0a 20 20 20 20 20 20 | 20 20 5c 65 6c 73 65 20 |p. | \else |
|00004740| 20 5c 65 78 70 61 6e 64 | 61 66 74 65 72 5c 5e 5e | \expand|after\^^|
|00004750| 61 31 5c 66 69 7d 0a 25 | 20 20 20 20 5c 65 6e 64 |a1\fi}.%| \end|
|00004760| 7b 6d 61 63 72 6f 63 6f | 64 65 7d 0a 25 20 5c 65 |{macroco|de}.% \e|
|00004770| 6e 64 7b 6d 61 63 72 6f | 7d 0a 25 20 5c 62 65 67 |nd{macro|}.% \beg|
|00004780| 69 6e 7b 6d 61 63 72 6f | 7d 7b 5c 70 40 66 69 72 |in{macro|}{\p@fir|
|00004790| 73 74 7d 0a 25 20 20 20 | 20 54 68 69 73 20 73 65 |st}.% | This se|
|000047a0| 74 73 20 22 5c 70 40 66 | 69 72 73 74 22 20 74 6f |ts "\p@f|irst" to|
|000047b0| 20 74 68 65 20 22 5c 66 | 75 74 75 72 65 64 65 66 | the "\f|uturedef|
|000047c0| 22 20 65 78 70 61 6e 73 | 69 6f 6e 20 6f 66 20 74 |" expans|ion of t|
|000047d0| 68 65 20 66 69 72 73 74 | 0a 25 20 20 20 20 74 6f |he first|.% to|
|000047e0| 6b 65 6e 20 77 65 20 77 | 61 6e 74 20 74 6f 7e 6d |ken we w|ant to~m|
|000047f0| 61 74 63 68 2e 20 22 5c | 5e 5e 61 32 22 7e 77 69 |atch. "\|^^a2"~wi|
|00004800| 6c 6c 20 72 65 77 72 61 | 70 20 74 68 65 20 72 65 |ll rewra|p the re|
|00004810| 73 74 20 6f 66 7e 22 5c | 74 6f 6b 73 40 22 2c 0a |st of~"\|toks@",.|
|00004820| 25 20 20 20 20 61 6e 64 | 20 6e 65 65 64 73 20 61 |% and| needs a|
|00004830| 6e 20 28 61 73 7e 74 6f | 7e 79 65 74 29 20 75 6e |n (as~to|~yet) un|
|00004840| 6d 61 74 63 68 65 64 20 | 63 6c 6f 73 69 6e 67 20 |matched |closing |
|00004850| 62 72 61 63 65 20 66 6f | 72 20 74 68 61 74 2e 0a |brace fo|r that..|
|00004860| 25 20 20 20 20 49 74 7e | 77 69 6c 6c 20 70 72 6f |% It~|will pro|
|00004870| 76 69 64 65 20 74 68 65 | 20 6d 61 74 63 68 69 6e |vide the| matchin|
|00004880| 67 20 6f 70 65 6e 20 6f | 6e 65 20 62 79 7e 69 74 |g open o|ne by~it|
|00004890| 73 65 6c 66 2e 0a 25 20 | 20 20 20 5c 62 65 67 69 |self..% | \begi|
|000048a0| 6e 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 5c 64 65 |n{macroc|ode}.\de|
|000048b0| 66 5c 5e 5e 61 31 7b 5c | 69 66 66 61 6c 73 65 7b |f\^^a1{\|iffalse{|
|000048c0| 5c 66 69 0a 20 20 20 20 | 20 20 20 5c 65 78 70 61 |\fi. | \expa|
|000048d0| 6e 64 61 66 74 65 72 5c | 66 75 74 75 72 65 64 65 |ndafter\|futurede|
|000048e0| 66 20 5c 65 78 70 61 6e | 64 61 66 74 65 72 5c 70 |f \expan|dafter\p|
|000048f0| 40 66 69 72 73 74 0a 20 | 20 20 20 20 20 20 5c 65 |@first. | \e|
|00004900| 78 70 61 6e 64 61 66 74 | 65 72 5c 5e 5e 61 32 5c |xpandaft|er\^^a2\|
|00004910| 74 68 65 5c 74 6f 6b 73 | 40 7d 7d 0a 25 20 20 20 |the\toks|@}}.% |
|00004920| 20 5c 65 6e 64 7b 6d 61 | 63 72 6f 63 6f 64 65 7d | \end{ma|crocode}|
|00004930| 0a 25 20 5c 65 6e 64 7b | 6d 61 63 72 6f 7d 0a 25 |.% \end{|macro}.%|
|00004940| 20 4f 6b 2c 20 77 65 20 | 72 65 77 72 61 70 20 74 | Ok, we |rewrap t|
|00004950| 68 65 20 72 65 73 74 20 | 74 6f 20 62 65 20 6d 61 |he rest |to be ma|
|00004960| 74 63 68 65 64 20 69 6e | 74 6f 7e 22 5c 70 40 6d |tched in|to~"\p@m|
|00004970| 61 74 63 68 22 2c 20 61 | 6e 64 20 74 68 65 0a 25 |atch", a|nd the.%|
|00004980| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 69 6e 74 | replace|ment int|
|00004990| 6f 7e 22 5c 70 40 72 65 | 70 6c 61 63 65 22 2c 20 |o~"\p@re|place", |
|000049a0| 61 66 74 65 72 20 77 68 | 69 63 68 20 77 65 20 63 |after wh|ich we c|
|000049b0| 6f 6e 74 69 6e 75 65 20 | 77 69 74 68 7e 22 5c 5e |ontinue |with~"\^|
|000049c0| 5e 61 33 22 2e 0a 25 20 | 20 20 20 5c 62 65 67 69 |^a3"..% | \begi|
|000049d0| 6e 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 5c 64 65 |n{macroc|ode}.\de|
|000049e0| 66 5c 5e 5e 61 32 23 31 | 23 7b 5c 70 40 6d 61 74 |f\^^a2#1|#{\p@mat|
|000049f0| 63 68 7b 23 31 7d 5c 61 | 66 74 65 72 61 73 73 69 |ch{#1}\a|fterassi|
|00004a00| 67 6e 6d 65 6e 74 5c 5e | 5e 61 33 5c 70 40 72 65 |gnment\^|^a3\p@re|
|00004a10| 70 6c 61 63 65 7d 0a 25 | 20 20 20 20 5c 65 6e 64 |place}.%| \end|
|00004a20| 7b 6d 61 63 72 6f 63 6f | 64 65 7d 0a 25 20 54 68 |{macroco|de}.% Th|
|00004a30| 65 20 72 65 6d 61 69 6e | 69 6e 67 20 73 75 62 73 |e remain|ing subs|
|00004a40| 74 69 74 75 74 69 6f 6e | 73 20 77 65 20 72 65 70 |titution|s we rep|
|00004a50| 61 63 6b 20 69 6e 74 6f | 7e 22 5c 74 6f 6b 73 40 |ack into|~"\toks@|
|00004a60| 22 2e 20 4e 6f 77 20 77 | 65 20 6e 65 65 64 20 74 |". Now w|e need t|
|00004a70| 6f 0a 25 20 69 6e 73 65 | 72 74 20 74 68 65 20 6d |o.% inse|rt the m|
|00004a80| 61 74 63 68 69 6e 67 20 | 6f 70 65 6e 69 6e 67 20 |atching |opening |
|00004a90| 62 72 61 63 65 20 66 6f | 72 20 74 68 65 20 63 6c |brace fo|r the cl|
|00004aa0| 6f 73 69 6e 67 20 6f 6e | 65 20 77 65 20 70 75 74 |osing on|e we put|
|00004ab0| 7e 62 65 66 6f 72 65 2e | 0a 25 20 20 20 20 5c 62 |~before.|.% \b|
|00004ac0| 65 67 69 6e 7b 6d 61 63 | 72 6f 63 6f 64 65 7d 0a |egin{mac|rocode}.|
|00004ad0| 5c 64 65 66 5c 5e 5e 61 | 33 7b 5c 61 66 74 65 72 |\def\^^a|3{\after|
|00004ae0| 61 73 73 69 67 6e 6d 65 | 6e 74 5c 5e 5e 61 34 5c |assignme|nt\^^a4\|
|00004af0| 74 6f 6b 73 40 5c 65 78 | 70 61 6e 64 61 66 74 65 |toks@\ex|pandafte|
|00004b00| 72 7b 5c 69 66 66 61 6c | 73 65 7d 5c 66 69 7d 0a |r{\iffal|se}\fi}.|
|00004b10| 25 20 20 20 20 5c 65 6e | 64 7b 6d 61 63 72 6f 63 |% \en|d{macroc|
|00004b20| 6f 64 65 7d 0a 25 20 57 | 65 20 6e 6f 77 20 67 65 |ode}.% W|e now ge|
|00004b30| 74 20 74 68 65 20 66 69 | 72 73 74 20 28 6f 72 20 |t the fi|rst (or |
|00004b40| 6e 65 78 74 29 20 74 6f | 6b 65 6e 20 6f 66 20 74 |next) to|ken of t|
|00004b50| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 6d 61 63 72 |he origi|nal macr|
|00004b60| 6f 2e 0a 25 20 20 20 20 | 5c 62 65 67 69 6e 7b 6d |o..% |\begin{m|
|00004b70| 61 63 72 6f 63 6f 64 65 | 7d 0a 5c 64 65 66 5c 5e |acrocode|}.\def\^|
|00004b80| 5e 61 34 7b 5c 66 75 74 | 75 72 65 64 65 66 5c 6e |^a4{\fut|uredef\n|
|00004b90| 65 78 74 5c 5e 5e 61 35 | 7d 0a 25 20 20 20 20 5c |ext\^^a5|}.% \|
|00004ba0| 65 6e 64 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 0a 25 |end{macr|ocode}.%|
|00004bb0| 20 49 66 20 74 68 69 73 | 20 74 6f 6b 65 6e 20 6d | If this| token m|
|00004bc0| 61 74 63 68 65 73 7e 22 | 5c 70 40 66 69 72 73 74 |atches~"|\p@first|
|00004bd0| 22 2c 20 77 65 20 63 68 | 65 63 6b 20 74 68 65 20 |", we ch|eck the |
|00004be0| 72 65 73 74 20 69 6e 7e | 22 5c 5e 5e 61 36 22 2e |rest in~|"\^^a6".|
|00004bf0| 20 57 65 0a 25 20 63 6f | 6c 6c 65 63 74 20 69 6e | We.% co|llect in|
|00004c00| 7e 22 5c 74 6f 6b 73 40 | 22 20 61 6c 6c 20 74 6f |~"\toks@|" all to|
|00004c10| 6b 65 6e 73 20 6d 61 74 | 63 68 65 64 20 73 6f 20 |kens mat|ched so |
|00004c20| 66 61 72 20 28 65 78 63 | 6c 75 64 69 6e 67 20 22 |far (exc|luding "|
|00004c30| 5c 70 40 66 69 72 73 74 | 22 29 2c 0a 25 20 73 6f |\p@first|"),.% so|
|00004c40| 20 74 68 61 74 20 77 65 | 20 63 61 6e 0a 25 20 72 | that we| can.% r|
|00004c50| 65 69 6e 73 65 72 74 20 | 74 68 65 6d 20 69 66 20 |einsert |them if |
|00004c60| 74 68 65 20 6d 61 74 63 | 68 20 63 61 6e 6e 6f 74 |the matc|h cannot|
|00004c70| 20 62 65 20 63 6f 6d 70 | 6c 65 74 65 64 20 73 75 | be comp|leted su|
|00004c80| 63 63 65 73 73 66 75 6c | 6c 79 2e 20 54 68 69 73 |ccessful|ly. This|
|00004c90| 7e 69 73 0a 25 20 64 6f | 6e 65 20 69 6e 20 61 7e |~is.% do|ne in a~|
|00004ca0| 73 65 70 61 72 61 74 65 | 20 67 72 6f 75 70 2e 20 |separate| group. |
|00004cb0| 49 66 7e 22 5c 6e 65 78 | 74 22 20 74 75 72 6e 73 |If~"\nex|t" turns|
|00004cc0| 20 6f 75 74 20 74 6f 0a | 25 20 62 65 7e 22 5c 40 | out to.|% be~"\@|
|00004cd0| 6e 64 70 40 74 63 68 22 | 2c 20 68 6f 77 65 76 65 |ndp@tch"|, howeve|
|00004ce0| 72 2c 0a 25 20 74 68 69 | 73 20 69 73 20 61 6e 7e |r,.% thi|s is an~|
|00004cf0| 65 72 72 6f 72 20 69 6e | 64 69 63 61 74 69 6f 6e |error in|dication|
|00004d00| 2e 20 49 74 7e 6d 65 61 | 6e 73 20 74 68 61 74 20 |. It~mea|ns that |
|00004d10| 74 68 65 20 65 6e 64 20 | 6f 66 20 70 61 74 63 68 |the end |of patch|
|00004d20| 61 62 6c 65 0a 25 20 6d | 61 74 65 72 69 61 6c 20 |able.% m|aterial |
|00004d30| 77 61 73 20 72 65 61 63 | 68 65 64 2e 20 57 65 20 |was reac|hed. We |
|00004d40| 63 61 6c 6c 20 74 68 65 | 6e 7e 22 5c 5e 5e 65 31 |call the|n~"\^^e1|
|00004d50| 22 2c 20 77 68 69 63 68 | 20 71 75 69 74 73 20 69 |", which| quits i|
|00004d60| 6e 20 74 68 61 74 0a 25 | 20 63 61 73 65 20 69 6e |n that.%| case in|
|00004d70| 20 61 20 73 6f 6d 65 77 | 68 61 74 20 75 6e 75 73 | a somew|hat unus|
|00004d80| 75 61 6c 20 28 62 75 74 | 20 72 65 6c 61 74 69 76 |ual (but| relativ|
|00004d90| 65 6c 79 20 66 61 73 74 | 29 20 77 61 79 2c 20 72 |ely fast|) way, r|
|00004da0| 65 69 6e 73 65 72 74 69 | 6e 67 0a 25 20 74 68 65 |einserti|ng.% the|
|00004db0| 20 67 6f 74 74 65 6e 7e | 22 5c 40 6e 64 70 40 74 | gotten~|"\@ndp@t|
|00004dc0| 63 68 22 2e 0a 25 0a 25 | 20 49 74 20 64 6f 65 73 |ch"..%.%| It does|
|00004dd0| 20 6e 6f 74 20 64 6f 20 | 61 6e 79 20 68 61 72 6d | not do |any harm|
|00004de0| 20 74 68 61 74 20 22 5c | 6e 65 78 74 22 20 69 73 | that "\|next" is|
|00004df0| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 63 6f | contain|ed in co|
|00004e00| 6e 64 69 74 69 6f 6e 61 | 6c 0a 25 20 63 6f 6e 74 |nditiona|l.% cont|
|00004e10| 65 78 74 2e 20 43 6f 6d | 69 6e 67 20 66 72 6f 6d |ext. Com|ing from|
|00004e20| 7e 22 5c 66 75 74 75 72 | 65 64 65 66 22 2c 20 69 |~"\futur|edef", i|
|00004e30| 74 20 63 61 6e 6e 6f 74 | 20 62 65 20 22 5c 6c 65 |t cannot| be "\le|
|00004e40| 74 22 20 74 6f 20 61 6e | 0a 25 20 75 6e 6d 61 74 |t" to an|.% unmat|
|00004e50| 63 68 65 64 20 63 6f 6e | 64 69 74 69 6f 6e 61 6c |ched con|ditional|
|00004e60| 2c 20 61 6e 64 20 77 69 | 6c 6c 20 63 6f 72 72 65 |, and wi|ll corre|
|00004e70| 63 74 6c 79 20 62 65 7e | 73 6b 69 70 70 65 64 2e |ctly be~|skipped.|
|00004e80| 0a 25 20 20 20 20 5c 62 | 65 67 69 6e 7b 6d 61 63 |.% \b|egin{mac|
|00004e90| 72 6f 63 6f 64 65 7d 0a | 5c 64 65 66 5c 5e 5e 61 |rocode}.|\def\^^a|
|00004ea0| 35 7b 5c 69 66 78 5c 6e | 65 78 74 5c 70 40 66 69 |5{\ifx\n|ext\p@fi|
|00004eb0| 72 73 74 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |rst. | |
|00004ec0| 20 5c 62 65 67 69 6e 67 | 72 6f 75 70 20 5c 74 6f | \beging|roup \to|
|00004ed0| 6b 73 40 7b 7d 5c 65 78 | 70 61 6e 64 61 66 74 65 |ks@{}\ex|pandafte|
|00004ee0| 72 5c 5e 5e 61 36 25 0a | 20 20 20 20 20 20 20 20 |r\^^a6%.| |
|00004ef0| 20 20 5c 65 6c 73 65 5c | 69 66 78 5c 6e 65 78 74 | \else\|ifx\next|
|00004f00| 5c 40 6e 64 70 40 74 63 | 68 20 5c 5e 5e 65 31 5c |\@ndp@tc|h \^^e1\|
|00004f10| 66 69 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 5c |fi. | \|
|00004f20| 6e 65 78 74 20 5c 65 78 | 70 61 6e 64 61 66 74 65 |next \ex|pandafte|
|00004f30| 72 20 5c 5e 5e 61 34 25 | 0a 20 20 20 20 20 20 20 |r \^^a4%|. |
|00004f40| 20 20 20 5c 66 69 7d 0a | 25 20 20 20 20 5c 65 6e | \fi}.|% \en|
|00004f50| 64 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 25 20 49 |d{macroc|ode}.% I|
|00004f60| 6e 20 63 61 73 65 20 6f | 66 20 61 6e 20 65 72 72 |n case o|f an err|
|00004f70| 6f 72 2c 20 77 65 20 67 | 69 76 65 20 74 68 65 20 |or, we g|ive the |
|00004f80| 6f 72 69 67 69 6e 61 6c | 20 6d 61 63 72 6f 20 28 |original| macro (|
|00004f90| 77 68 69 63 68 20 68 61 | 73 20 6e 6f 74 20 79 65 |which ha|s not ye|
|00004fa0| 74 0a 25 20 62 65 65 6e | 20 70 61 74 63 68 65 64 |t.% been| patched|
|00004fb0| 29 2e 20 41 6e 64 20 61 | 74 20 64 65 66 69 6e 69 |). And a|t defini|
|00004fc0| 74 69 6f 6e 20 74 69 6d | 65 2c 20 77 65 20 77 69 |tion tim|e, we wi|
|00004fd0| 6c 6c 20 73 68 6f 77 20 | 68 6f 77 20 74 68 65 20 |ll show |how the |
|00004fe0| 6d 61 63 72 6f 0a 25 20 | 6c 6f 6f 6b 73 20 6c 69 |macro.% |looks li|
|00004ff0| 6b 65 20 61 66 74 65 72 | 77 61 72 64 73 2e 0a 25 |ke after|wards..%|
|00005000| 20 20 20 20 5c 62 65 67 | 69 6e 7b 6d 61 63 72 6f | \beg|in{macro|
|00005010| 63 6f 64 65 7d 0a 5c 64 | 65 66 5c 5e 5e 65 31 7b |code}.\d|ef\^^e1{|
|00005020| 5c 6c 65 74 5c 5e 5e 61 | 34 5c 65 6e 64 67 72 6f |\let\^^a|4\endgro|
|00005030| 75 70 0a 20 20 20 20 20 | 20 20 20 20 20 5c 6e 65 |up. | \ne|
|00005040| 77 6c 69 6e 65 63 68 61 | 72 60 5c 5e 5e 4a 0a 20 |wlinecha|r`\^^J. |
|00005050| 20 20 20 20 20 20 20 20 | 20 5c 74 6f 6b 73 40 5c | | \toks@\|
|00005060| 65 78 70 61 6e 64 61 66 | 74 65 72 7b 5c 6e 65 78 |expandaf|ter{\nex|
|00005070| 74 40 7d 25 0a 20 20 20 | 20 20 20 20 20 20 20 5c |t@}%. | \|
|00005080| 65 72 72 6f 72 63 6f 6e | 74 65 78 74 6c 69 6e 65 |errorcon|textline|
|00005090| 73 5c 6d 40 6e 65 0a 20 | 20 20 20 20 20 20 20 20 |s\m@ne. | |
|000050a0| 20 5c 65 72 72 68 65 6c | 70 7b 49 20 61 6d 20 69 | \errhel|p{I am i|
|000050b0| 67 6e 6f 72 69 6e 67 20 | 69 6e 61 70 70 6c 69 63 |gnoring |inapplic|
|000050c0| 61 62 6c 65 20 70 61 74 | 63 68 65 73 2e 20 47 6f |able pat|ches. Go|
|000050d0| 20 6f 6e 2e 7d 25 0a 20 | 20 20 20 20 20 20 20 20 | on.}%. | |
|000050e0| 20 5c 65 72 72 6d 65 73 | 73 61 67 65 7b 57 68 65 | \errmes|sage{Whe|
|000050f0| 6e 20 74 72 79 69 6e 67 | 20 74 6f 20 70 61 74 63 |n trying| to patc|
|00005100| 68 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 65 |h. | \e|
|00005110| 78 70 61 6e 64 61 66 74 | 65 72 5c 73 74 72 69 6e |xpandaft|er\strin|
|00005120| 67 5c 5e 5e 65 30 2c 20 | 77 68 69 63 68 20 77 61 |g\^^e0, |which wa|
|00005130| 73 20 64 65 66 69 6e 65 | 64 20 61 73 5e 5e 4a 25 |s define|d as^^J%|
|00005140| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 65 78 |. | \ex|
|00005150| 70 61 6e 64 61 66 74 65 | 72 5c 6d 65 61 6e 69 6e |pandafte|r\meanin|
|00005160| 67 5c 5e 5e 65 30 5e 5e | 4a 25 0a 20 20 20 20 20 |g\^^e0^^|J%. |
|00005170| 20 20 20 20 20 20 20 74 | 68 65 20 66 6f 6c 6c 6f | t|he follo|
|00005180| 77 69 6e 67 20 70 61 74 | 63 68 65 73 20 72 65 6d |wing pat|ches rem|
|00005190| 61 69 6e 65 64 20 69 6e | 61 70 70 6c 69 63 61 62 |ained in|applicab|
|000051a0| 6c 65 3a 5e 5e 4a 25 0a | 20 20 20 20 20 20 20 20 |le:^^J%.| |
|000051b0| 20 20 20 20 5c 74 68 65 | 5c 74 6f 6b 73 40 5e 5e | \the|\toks@^^|
|000051c0| 4a 25 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 49 |J%. | I|
|000051d0| 20 77 69 6c 6c 20 73 68 | 6f 77 20 74 68 65 20 72 | will sh|ow the r|
|000051e0| 65 73 75 6c 74 73 20 6f | 66 20 74 68 65 20 73 75 |esults o|f the su|
|000051f0| 63 63 65 65 64 65 64 20 | 70 61 74 63 68 65 73 20 |cceeded |patches |
|00005200| 61 73 20 73 6f 6f 6e 5e | 5e 4a 25 0a 20 20 20 20 |as soon^|^J%. |
|00005210| 20 20 20 20 20 20 20 20 | 61 73 20 49 20 63 61 6e | |as I can|
|00005220| 20 77 69 74 68 6f 75 74 | 20 66 75 72 74 68 65 72 | without| further|
|00005230| 20 63 6f 6d 6d 65 6e 74 | 2c 20 73 6f 20 64 6f 20 | comment|, so do |
|00005240| 6e 6f 74 20 62 65 20 73 | 75 72 70 72 69 73 65 64 |not be s|urprised|
|00005250| 2e 7d 25 0a 20 20 20 20 | 20 20 20 20 20 20 5c 61 |.}%. | \a|
|00005260| 66 74 65 72 67 72 6f 75 | 70 5c 73 68 6f 77 20 5c |ftergrou|p\show \|
|00005270| 65 78 70 61 6e 64 61 66 | 74 65 72 5c 61 66 74 65 |expandaf|ter\afte|
|00005280| 72 67 72 6f 75 70 5c 5e | 5e 65 30 25 0a 7d 0a 25 |rgroup\^|^e0%.}.%|
|00005290| 20 20 20 20 5c 65 6e 64 | 7b 6d 61 63 72 6f 63 6f | \end|{macroco|
|000052a0| 64 65 7d 0a 25 20 4f 6b | 2c 20 77 65 20 6c 6f 6f |de}.% Ok|, we loo|
|000052b0| 6b 20 77 68 65 74 68 65 | 72 20 74 68 65 72 65 20 |k whethe|r there |
|000052c0| 61 72 65 20 61 6e 79 20 | 74 6f 6b 65 6e 73 20 72 |are any |tokens r|
|000052d0| 65 6d 61 69 6e 69 6e 67 | 20 74 6f 20 62 65 20 6d |emaining| to be m|
|000052e0| 61 74 63 68 65 64 2e 20 | 49 66 0a 25 20 74 68 65 |atched. |If.% the|
|000052f0| 72 65 20 61 72 65 20 6e | 6f 74 2c 20 72 65 70 6c |re are n|ot, repl|
|00005300| 61 63 65 6d 65 6e 74 20 | 63 61 6e 20 67 6f 7e 66 |acement |can go~f|
|00005310| 6f 72 74 68 2e 20 49 6e | 7e 74 68 61 74 20 63 61 |orth. In|~that ca|
|00005320| 73 65 2c 20 77 65 20 65 | 6e 64 20 6f 75 72 0a 25 |se, we e|nd our.%|
|00005330| 20 6c 6f 63 61 6c 20 67 | 72 6f 75 70 2c 20 61 6e | local g|roup, an|
|00005340| 64 20 67 6f 20 6f 76 65 | 72 20 74 6f 7e 22 5c 5e |d go ove|r to~"\^|
|00005350| 5e 61 63 22 2e 20 49 66 | 7e 74 68 65 72 65 20 61 |^ac". If|~there a|
|00005360| 72 65 2c 20 77 65 20 63 | 6f 6e 74 69 6e 75 65 0a |re, we c|ontinue.|
|00005370| 25 20 77 69 74 68 7e 22 | 5c 5e 5e 61 37 22 2e 0a |% with~"|\^^a7"..|
|00005380| 25 20 20 20 20 5c 62 65 | 67 69 6e 7b 6d 61 63 72 |% \be|gin{macr|
|00005390| 6f 63 6f 64 65 7d 0a 5c | 64 65 66 5c 5e 5e 61 36 |ocode}.\|def\^^a6|
|000053a0| 7b 5c 65 64 65 66 5c 6e | 65 78 74 7b 5c 74 68 65 |{\edef\n|ext{\the|
|000053b0| 5c 70 40 6d 61 74 63 68 | 7d 25 0a 20 20 20 20 20 |\p@match|}%. |
|000053c0| 20 20 20 20 5c 69 66 78 | 5c 6e 65 78 74 5c 65 6d | \ifx|\next\em|
|000053d0| 70 74 79 20 5c 65 6e 64 | 67 72 6f 75 70 5c 65 78 |pty \end|group\ex|
|000053e0| 70 61 6e 64 61 66 74 65 | 72 5c 5e 5e 61 63 25 0a |pandafte|r\^^ac%.|
|000053f0| 20 20 20 20 20 20 20 20 | 20 5c 65 6c 73 65 20 5c | | \else \|
|00005400| 65 78 70 61 6e 64 61 66 | 74 65 72 5c 5e 5e 61 37 |expandaf|ter\^^a7|
|00005410| 5c 66 69 7d 0a 25 20 20 | 20 20 5c 65 6e 64 7b 6d |\fi}.% | \end{m|
|00005420| 61 63 72 6f 63 6f 64 65 | 7d 0a 25 20 57 65 20 67 |acrocode|}.% We g|
|00005430| 65 74 20 74 68 65 20 6e | 65 78 74 20 74 6f 6b 65 |et the n|ext toke|
|00005440| 6e 20 74 6f 20 62 65 20 | 6d 61 74 63 68 65 64 20 |n to be |matched |
|00005450| 69 6e 74 6f 7e 22 5c 6e | 65 78 74 40 22 20 66 72 |into~"\n|ext@" fr|
|00005460| 6f 6d 7e 22 5c 70 40 6d | 61 74 63 68 22 2e 0a 25 |om~"\p@m|atch"..%|
|00005470| 20 57 65 7e 77 69 6c 6c | 20 68 61 76 65 20 74 6f | We~will| have to|
|00005480| 20 61 64 6a 75 73 74 20 | 22 5c 70 40 6d 61 74 63 | adjust |"\p@matc|
|00005490| 68 22 20 61 67 61 69 6e | 20 77 69 74 68 20 61 20 |h" again| with a |
|000054a0| 74 6f 6b 65 6e 20 6c 69 | 73 74 0a 25 20 72 65 61 |token li|st.% rea|
|000054b0| 73 73 69 67 6e 6d 65 6e | 74 2e 20 46 6f 72 20 74 |ssignmen|t. For t|
|000054c0| 68 69 73 20 77 65 20 6e | 65 65 64 20 74 6f 20 69 |his we n|eed to i|
|000054d0| 6e 73 65 72 74 20 61 6e | 20 75 6e 6d 61 74 63 68 |nsert an| unmatch|
|000054e0| 65 64 20 63 6c 6f 73 69 | 6e 67 20 62 72 61 63 65 |ed closi|ng brace|
|000054f0| 0a 25 20 61 66 74 65 72 | 20 69 74 73 20 65 78 70 |.% after| its exp|
|00005500| 61 6e 73 69 6f 6e 2c 20 | 77 68 69 63 68 20 77 69 |ansion, |which wi|
|00005510| 6c 6c 20 61 67 61 69 6e | 20 62 65 20 6d 61 74 63 |ll again| be matc|
|00005520| 68 65 64 20 6c 61 74 65 | 72 2e 0a 25 20 20 20 20 |hed late|r..% |
|00005530| 5c 62 65 67 69 6e 7b 6d | 61 63 72 6f 63 6f 64 65 |\begin{m|acrocode|
|00005540| 7d 0a 5c 64 65 66 5c 5e | 5e 61 37 7b 5c 69 66 66 |}.\def\^|^a7{\iff|
|00005550| 61 6c 73 65 7b 5c 66 69 | 0a 20 20 20 20 20 20 20 |alse{\fi|. |
|00005560| 20 20 20 5c 65 78 70 61 | 6e 64 61 66 74 65 72 5c | \expa|ndafter\|
|00005570| 66 75 74 75 72 65 64 65 | 66 5c 65 78 70 61 6e 64 |futurede|f\expand|
|00005580| 61 66 74 65 72 5c 6e 65 | 78 74 40 0a 20 20 20 20 |after\ne|xt@. |
|00005590| 20 20 20 20 20 20 5c 65 | 78 70 61 6e 64 61 66 74 | \e|xpandaft|
|000055a0| 65 72 5c 5e 5e 61 38 5c | 74 68 65 5c 70 40 6d 61 |er\^^a8\|the\p@ma|
|000055b0| 74 63 68 7d 7d 0a 25 20 | 20 20 20 5c 65 6e 64 7b |tch}}.% | \end{|
|000055c0| 6d 61 63 72 6f 63 6f 64 | 65 7d 0a 25 20 4f 6b 2c |macrocod|e}.% Ok,|
|000055d0| 20 68 65 72 65 20 77 65 | 20 67 61 74 68 65 72 20 | here we| gather |
|000055e0| 74 68 65 20 72 65 73 74 | 20 69 6e 74 6f 7e 22 5c |the rest| into~"\|
|000055f0| 70 40 6d 61 74 63 68 22 | 20 61 6e 64 7e 63 6f 6e |p@match"| and~con|
|00005600| 74 69 6e 75 65 2e 0a 25 | 20 20 20 20 5c 62 65 67 |tinue..%| \beg|
|00005610| 69 6e 7b 6d 61 63 72 6f | 63 6f 64 65 7d 0a 5c 64 |in{macro|code}.\d|
|00005620| 65 66 5c 5e 5e 61 38 7b | 5c 61 66 74 65 72 61 73 |ef\^^a8{|\afteras|
|00005630| 73 69 67 6e 6d 65 6e 74 | 5c 5e 5e 61 39 5c 70 40 |signment|\^^a9\p@|
|00005640| 6d 61 74 63 68 5c 65 78 | 70 61 6e 64 61 66 74 65 |match\ex|pandafte|
|00005650| 72 7b 5c 69 66 66 61 6c | 73 65 7d 5c 66 69 7d 0a |r{\iffal|se}\fi}.|
|00005660| 25 20 20 20 20 5c 65 6e | 64 7b 6d 61 63 72 6f 63 |% \en|d{macroc|
|00005670| 6f 64 65 7d 0a 25 20 4e | 6f 77 20 77 65 20 67 65 |ode}.% N|ow we ge|
|00005680| 74 20 74 68 65 20 6e 65 | 78 74 20 74 6f 6b 65 6e |t the ne|xt token|
|00005690| 20 66 72 6f 6d 20 74 68 | 65 20 6f 72 69 67 69 6e | from th|e origin|
|000056a0| 61 6c 20 6d 61 63 72 6f | 20 69 6e 74 6f 7e 22 5c |al macro| into~"\|
|000056b0| 6e 65 78 74 22 2e 0a 25 | 20 20 20 20 5c 62 65 67 |next"..%| \beg|
|000056c0| 69 6e 7b 6d 61 63 72 6f | 63 6f 64 65 7d 0a 5c 64 |in{macro|code}.\d|
|000056d0| 65 66 5c 5e 5e 61 39 7b | 5c 66 75 74 75 72 65 64 |ef\^^a9{|\futured|
|000056e0| 65 66 5c 6e 65 78 74 5c | 5e 5e 61 61 7d 0a 25 20 |ef\next\|^^aa}.% |
|000056f0| 20 20 20 5c 65 6e 64 7b | 6d 61 63 72 6f 63 6f 64 | \end{|macrocod|
|00005700| 65 7d 0a 25 20 49 6e 20 | 63 61 73 65 20 6f 66 20 |e}.% In |case of |
|00005710| 61 20 6d 61 74 63 68 2c | 20 77 65 20 63 6f 6e 74 |a match,| we cont|
|00005720| 69 6e 75 65 20 77 69 74 | 68 7e 22 5c 5e 5e 61 62 |inue wit|h~"\^^ab|
|00005730| 22 2e 20 4f 74 68 65 72 | 77 69 73 65 2c 20 69 66 |". Other|wise, if|
|00005740| 7e 77 65 20 68 61 76 65 | 0a 25 20 72 65 61 63 68 |~we have|.% reach|
|00005750| 65 64 20 74 68 65 20 69 | 6c 6c 65 67 61 6c 20 65 |ed the i|llegal e|
|00005760| 6e 64 20 6f 66 7e 6d 61 | 63 72 6f 20 28 22 5c 6e |nd of~ma|cro ("\n|
|00005770| 65 78 74 22 20 73 65 74 | 20 74 6f 7e 22 5c 40 6e |ext" set| to~"\@n|
|00005780| 64 70 40 74 63 68 22 29 | 2c 0a 25 20 77 65 7e 73 |dp@tch")|,.% we~s|
|00005790| 74 6f 70 2e 0a 25 20 49 | 66 7e 77 65 20 68 61 76 |top..% I|f~we hav|
|000057a0| 65 20 6e 6f 20 6d 61 74 | 63 68 20 6c 65 67 61 6c |e no mat|ch legal|
|000057b0| 6c 79 2c 20 77 65 20 72 | 65 69 6e 73 65 72 74 7e |ly, we r|einsert~|
|000057c0| 22 5c 70 40 66 69 72 73 | 74 22 2c 20 63 6f 6e 74 |"\p@firs|t", cont|
|000057d0| 69 6e 75 65 0a 25 20 73 | 63 61 6e 6e 69 6e 67 20 |inue.% s|canning |
|000057e0| 77 69 74 68 7e 22 5c 5e | 5e 61 34 22 2c 20 72 65 |with~"\^|^a4", re|
|000057f0| 69 6e 73 65 72 74 69 6e | 67 20 65 76 65 72 79 74 |insertin|g everyt|
|00005800| 68 69 6e 67 20 6d 61 74 | 63 68 65 64 20 77 69 74 |hing mat|ched wit|
|00005810| 68 20 74 68 65 20 68 65 | 6c 70 0a 25 20 6f 66 20 |h the he|lp.% of |
|00005820| 74 68 65 20 22 5c 66 75 | 74 75 72 65 64 65 66 22 |the "\fu|turedef"|
|00005830| 20 67 65 6e 65 72 61 74 | 65 64 20 22 5c 61 66 74 | generat|ed "\aft|
|00005840| 65 72 67 72 6f 75 70 22 | 2d 73 65 71 75 65 6e 63 |ergroup"|-sequenc|
|00005850| 65 20 69 6e 7e 22 5c 74 | 6f 6b 73 40 22 2e 0a 25 |e in~"\t|oks@"..%|
|00005860| 20 54 68 69 73 20 77 69 | 6c 6c 20 68 61 70 65 6e | This wi|ll hapen|
|00005870| 20 61 6c 73 6f 20 69 66 | 20 22 5c 40 6e 64 70 40 | also if| "\@ndp@|
|00005880| 74 63 68 22 20 69 6e 64 | 69 63 61 74 65 73 20 73 |tch" ind|icates s|
|00005890| 6f 6d 65 74 68 69 6e 67 | 20 77 65 6e 74 0a 25 20 |omething| went.% |
|000058a0| 68 61 79 77 69 72 65 2c | 20 62 65 63 61 75 73 65 |haywire,| because|
|000058b0| 20 22 5c 40 6e 64 70 40 | 74 63 68 22 20 63 61 6e | "\@ndp@|tch" can|
|000058c0| 6e 6f 74 20 62 65 20 69 | 6e 20 61 7e 6d 61 74 63 |not be i|n a~matc|
|000058d0| 68 20 73 65 71 75 65 6e | 63 65 20 28 69 66 20 79 |h sequen|ce (if y|
|000058e0| 6f 75 0a 25 20 64 6f 20 | 6e 6f 74 20 70 75 74 20 |ou.% do |not put |
|000058f0| 69 74 20 74 68 65 72 65 | 2c 20 61 6e 64 20 79 6f |it there|, and yo|
|00005900| 75 20 61 72 65 20 6e 6f | 74 20 61 6c 6c 6f 77 65 |u are no|t allowe|
|00005910| 64 20 74 6f 29 2e 0a 25 | 20 74 68 69 73 20 77 65 |d to)..%| this we|
|00005920| 20 64 6f 20 61 6c 73 6f | 20 69 6e 20 74 68 65 20 | do also| in the |
|00005930| 63 61 73 65 20 6f 66 20 | 65 72 72 6f 72 2c 20 61 |case of |error, a|
|00005940| 73 20 79 6f 75 20 63 61 | 6e 20 65 61 73 69 6c 79 |s you ca|n easily|
|00005950| 20 73 65 65 2e 0a 25 20 | 20 20 20 5c 62 65 67 69 | see..% | \begi|
|00005960| 6e 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 5c 64 65 |n{macroc|ode}.\de|
|00005970| 66 5c 5e 5e 61 61 7b 5c | 69 66 78 5c 6e 65 78 74 |f\^^aa{\|ifx\next|
|00005980| 40 5c 6e 65 78 74 0a 20 | 20 20 20 20 20 20 20 20 |@\next. | |
|00005990| 20 20 20 20 20 5c 65 78 | 70 61 6e 64 61 66 74 65 | \ex|pandafte|
|000059a0| 72 5c 5e 5e 61 62 25 0a | 20 20 20 20 20 20 20 20 |r\^^ab%.| |
|000059b0| 20 20 5c 65 6c 73 65 20 | 5c 61 66 74 65 72 67 72 | \else |\aftergr|
|000059c0| 6f 75 70 5c 70 40 66 69 | 72 73 74 0a 20 20 20 20 |oup\p@fi|rst. |
|000059d0| 20 20 20 20 20 20 5c 61 | 66 74 65 72 67 72 6f 75 | \a|ftergrou|
|000059e0| 70 5c 5e 5e 61 34 25 0a | 20 20 20 20 20 20 20 20 |p\^^a4%.| |
|000059f0| 20 20 5c 74 68 65 5c 74 | 6f 6b 73 40 5c 6e 65 78 | \the\t|oks@\nex|
|00005a00| 74 5c 65 78 70 61 6e 64 | 61 66 74 65 72 5c 65 6e |t\expand|after\en|
|00005a10| 64 67 72 6f 75 70 5c 66 | 69 7d 0a 25 20 20 20 20 |dgroup\f|i}.% |
|00005a20| 5c 65 6e 64 7b 6d 61 63 | 72 6f 63 6f 64 65 7d 0a |\end{mac|rocode}.|
|00005a30| 25 20 57 65 20 6e 6f 77 | 20 68 61 76 65 20 74 6f |% We now| have to|
|00005a40| 20 61 70 70 65 6e 64 20 | 74 68 65 20 22 5c 61 66 | append |the "\af|
|00005a50| 74 65 72 67 72 6f 75 70 | 22 20 73 65 71 75 65 6e |tergroup|" sequen|
|00005a60| 63 65 20 6f 66 20 74 68 | 65 20 6e 65 78 74 20 6d |ce of th|e next m|
|00005a70| 61 74 63 68 65 64 0a 25 | 20 74 6f 6b 65 6e 20 69 |atched.%| token i|
|00005a80| 6e 7e 22 5c 6e 65 78 74 | 22 20 74 6f 7e 22 5c 74 |n~"\next|" to~"\t|
|00005a90| 6f 6b 73 40 22 2e 20 41 | 66 74 65 72 20 74 68 61 |oks@". A|fter tha|
|00005aa0| 74 2c 20 77 65 20 63 61 | 6e 20 6c 6f 6f 70 2e 0a |t, we ca|n loop..|
|00005ab0| 25 20 20 20 20 5c 62 65 | 67 69 6e 7b 6d 61 63 72 |% \be|gin{macr|
|00005ac0| 6f 63 6f 64 65 7d 0a 5c | 64 65 66 5c 5e 5e 61 62 |ocode}.\|def\^^ab|
|00005ad0| 7b 5c 74 6f 6b 73 40 5c | 65 78 70 61 6e 64 61 66 |{\toks@\|expandaf|
|00005ae0| 74 65 72 5c 65 78 70 61 | 6e 64 61 66 74 65 72 5c |ter\expa|ndafter\|
|00005af0| 65 78 70 61 6e 64 61 66 | 74 65 72 7b 25 0a 20 20 |expandaf|ter{%. |
|00005b00| 20 20 20 20 20 20 20 5c | 65 78 70 61 6e 64 61 66 | \|expandaf|
|00005b10| 74 65 72 5c 74 68 65 5c | 65 78 70 61 6e 64 61 66 |ter\the\|expandaf|
|00005b20| 74 65 72 5c 74 6f 6b 73 | 40 5c 6e 65 78 74 7d 25 |ter\toks|@\next}%|
|00005b30| 0a 20 20 20 20 20 20 20 | 20 20 5c 5e 5e 61 36 7d |. | \^^a6}|
|00005b40| 0a 25 20 20 20 20 5c 65 | 6e 64 7b 6d 61 63 72 6f |.% \e|nd{macro|
|00005b50| 63 6f 64 65 7d 0a 25 20 | 4f 6b 2c 20 68 65 72 65 |code}.% |Ok, here|
|00005b60| 20 66 6f 6c 6c 6f 77 73 | 20 74 68 65 20 63 6f 64 | follows| the cod|
|00005b70| 65 20 69 66 20 61 7e 6d | 61 74 63 68 20 7b 5c 65 |e if a~m|atch {\e|
|00005b80| 6d 20 77 61 73 5c 2f 7d | 20 63 6f 6d 70 6c 65 74 |m was\/}| complet|
|00005b90| 65 64 2e 20 57 65 0a 25 | 20 69 6e 73 65 72 74 20 |ed. We.%| insert |
|00005ba0| 74 68 65 20 74 6f 6b 65 | 6e 73 20 6f 66 7e 22 5c |the toke|ns of~"\|
|00005bb0| 70 40 72 65 70 6c 61 63 | 65 22 2e 20 57 65 7e 68 |p@replac|e". We~h|
|00005bc0| 61 76 65 20 74 6f 20 73 | 63 61 6e 20 22 5c 70 40 |ave to s|can "\p@|
|00005bd0| 72 65 70 6c 61 63 65 22 | 0a 25 20 74 6f 6b 65 6e |replace"|.% token|
|00005be0| 20 62 79 7e 74 6f 6b 65 | 6e 2c 20 73 6f 20 74 68 | by~toke|n, so th|
|00005bf0| 61 74 20 69 6d 70 6c 69 | 63 69 74 20 62 72 61 63 |at impli|cit brac|
|00005c00| 65 73 20 77 6f 72 6b 20 | 6c 69 6b 65 20 69 6e 20 |es work |like in |
|00005c10| 74 68 65 20 6d 61 74 63 | 68 0a 25 20 63 6f 64 65 |the matc|h.% code|
|00005c20| 20 73 65 71 75 65 6e 63 | 65 73 2e 20 57 65 20 64 | sequenc|es. We d|
|00005c30| 6f 20 74 68 69 73 20 75 | 6e 74 69 6c 20 22 5c 70 |o this u|ntil "\p|
|00005c40| 40 72 65 70 6c 61 63 65 | 22 20 69 73 20 65 78 68 |@replace|" is exh|
|00005c50| 61 75 73 74 65 64 2e 20 | 57 68 69 63 68 20 77 65 |austed. |Which we|
|00005c60| 0a 25 20 63 61 6e 20 64 | 65 74 65 63 74 20 62 79 |.% can d|etect by|
|00005c70| 20 66 69 6e 64 69 6e 67 | 20 22 5c 40 6e 64 70 40 | finding| "\@ndp@|
|00005c80| 74 63 68 22 2e 0a 25 20 | 20 20 20 5c 62 65 67 69 |tch"..% | \begi|
|00005c90| 6e 7b 6d 61 63 72 6f 63 | 6f 64 65 7d 0a 5c 64 65 |n{macroc|ode}.\de|
|00005ca0| 66 5c 5e 5e 61 63 7b 5c | 65 78 70 61 6e 64 61 66 |f\^^ac{\|expandaf|
|00005cb0| 74 65 72 5c 5e 5e 61 64 | 5c 74 68 65 5c 70 40 72 |ter\^^ad|\the\p@r|
|00005cc0| 65 70 6c 61 63 65 5c 40 | 6e 64 70 40 74 63 68 7d |eplace\@|ndp@tch}|
|00005cd0| 0a 25 20 20 20 20 5c 65 | 6e 64 7b 6d 61 63 72 6f |.% \e|nd{macro|
|00005ce0| 63 6f 64 65 7d 0a 25 20 | 54 68 65 20 66 6f 6c 6c |code}.% |The foll|
|00005cf0| 6f 77 69 6e 67 20 61 6e | 61 6c 79 73 69 73 20 6c |owing an|alysis l|
|00005d00| 6f 6f 70 20 69 73 20 61 | 62 6f 75 74 20 61 73 20 |oop is a|bout as |
|00005d10| 73 74 72 61 69 67 68 74 | 20 61 73 20 69 74 20 63 |straight| as it c|
|00005d20| 61 6e 20 67 65 74 2e 0a | 25 20 20 20 20 5c 62 65 |an get..|% \be|
|00005d30| 67 69 6e 7b 6d 61 63 72 | 6f 63 6f 64 65 7d 0a 5c |gin{macr|ocode}.\|
|00005d40| 64 65 66 5c 5e 5e 61 64 | 7b 5c 66 75 74 75 72 65 |def\^^ad|{\future|
|00005d50| 64 65 66 5c 6e 65 78 74 | 5c 5e 5e 61 65 7d 0a 5c |def\next|\^^ae}.\|
|00005d60| 64 65 66 5c 5e 5e 61 65 | 7b 5c 69 66 78 5c 6e 65 |def\^^ae|{\ifx\ne|
|00005d70| 78 74 5c 40 6e 64 70 40 | 74 63 68 0a 20 20 20 20 |xt\@ndp@|tch. |
|00005d80| 20 20 20 20 20 20 20 20 | 20 20 5c 65 78 70 61 6e | | \expan|
|00005d90| 64 61 66 74 65 72 5c 70 | 40 63 68 65 63 6b 0a 20 |dafter\p|@check. |
|00005da0| 20 20 20 20 20 20 20 20 | 20 5c 65 6c 73 65 0a 20 | | \else. |
|00005db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5c 6e 65 | | \ne|
|00005dc0| 78 74 20 5c 65 78 70 61 | 6e 64 61 66 74 65 72 5c |xt \expa|ndafter\|
|00005dd0| 5e 5e 61 64 25 0a 20 20 | 20 20 20 20 20 20 20 20 |^^ad%. | |
|00005de0| 5c 66 69 7d 0a 25 20 20 | 20 20 5c 65 6e 64 7b 6d |\fi}.% | \end{m|
|00005df0| 61 63 72 6f 63 6f 64 65 | 7d 0a 25 20 57 65 20 65 |acrocode|}.% We e|
|00005e00| 6e 64 20 68 65 72 65 20 | 62 79 20 67 69 76 69 6e |nd here |by givin|
|00005e10| 67 20 74 68 65 20 64 72 | 69 76 65 72 20 66 69 6c |g the dr|iver fil|
|00005e20| 65 20 66 6f 72 20 74 68 | 65 20 64 6f 63 75 6d 65 |e for th|e docume|
|00005e30| 6e 74 61 74 69 6f 6e 2c | 20 77 68 69 63 68 0a 25 |ntation,| which.%|
|00005e40| 20 77 69 6c 6c 20 74 79 | 70 69 63 61 6c 6c 79 20 | will ty|pically |
|00005e50| 62 65 20 65 78 74 72 61 | 63 74 65 64 20 75 73 69 |be extra|cted usi|
|00005e60| 6e 67 7e 22 64 6f 63 73 | 74 72 69 70 2e 73 74 79 |ng~"docs|trip.sty|
|00005e70| 22 2e 0a 25 20 20 20 20 | 5c 62 65 67 69 6e 7b 6d |"..% |\begin{m|
|00005e80| 61 63 72 6f 63 6f 64 65 | 7d 0a 25 3c 2b 64 72 69 |acrocode|}.%<+dri|
|00005e90| 76 65 72 3e 5c 64 6f 63 | 75 6d 65 6e 74 73 74 79 |ver>\doc|umentsty|
|00005ea0| 6c 65 5b 64 6f 63 5d 7b | 61 72 74 69 63 6c 65 7d |le[doc]{|article}|
|00005eb0| 0a 25 3c 2b 64 72 69 76 | 65 72 3e 20 20 20 20 5c |.%<+driv|er> \|
|00005ec0| 45 6e 61 62 6c 65 43 72 | 6f 73 73 72 65 66 73 0a |EnableCr|ossrefs.|
|00005ed0| 25 3c 2b 64 72 69 76 65 | 72 3e 25 20 20 20 20 5c |%<+drive|r>% \|
|00005ee0| 44 69 73 61 62 6c 65 43 | 72 6f 73 73 72 65 66 73 |DisableC|rossrefs|
|00005ef0| 0a 25 3c 2b 64 72 69 76 | 65 72 3e 0a 25 3c 2b 64 |.%<+driv|er>.%<+d|
|00005f00| 72 69 76 65 72 3e 20 20 | 20 20 5c 43 6f 64 65 6c |river> | \Codel|
|00005f10| 69 6e 65 49 6e 64 65 78 | 0a 25 3c 2b 64 72 69 76 |ineIndex|.%<+driv|
|00005f20| 65 72 3e 5c 62 65 67 69 | 6e 7b 64 6f 63 75 6d 65 |er>\begi|n{docume|
|00005f30| 6e 74 7d 0a 25 3c 2b 64 | 72 69 76 65 72 3e 20 20 |nt}.%<+d|river> |
|00005f40| 5c 44 6f 63 49 6e 70 75 | 74 7b 70 61 74 63 68 2e |\DocInpu|t{patch.|
|00005f50| 64 6f 63 7d 0a 25 3c 2b | 64 72 69 76 65 72 3e 5c |doc}.%<+|driver>\|
|00005f60| 65 6e 64 7b 64 6f 63 75 | 6d 65 6e 74 7d 0a 25 20 |end{docu|ment}.% |
|00005f70| 20 20 20 5c 65 6e 64 7b | 6d 61 63 72 6f 63 6f 64 | \end{|macrocod|
|00005f80| 65 7d 0a 25 5c 46 69 6e | 61 6c 65 0a |e}.%\Fin|ale. |
+--------+-------------------------+-------------------------+--------+--------+